logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git/

bootstrap.mk (805B)


  1. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  2. # SPDX-License-Identifier: MPL-2.0
  3. # Reduced Makefile dedicated to building executables for ./configure
  4. CC ?= cc
  5. # List of commands used by ./configure
  6. #
  7. # Can be checked with:
  8. # $ strace -o configure.strace -f -e execve ./configure
  9. # $ grep -F -e 'execve(' configure.strace | cut -f2 -d '"' | xargs -n1 basename | sort -u
  10. #all: cmd/cat cmd/echo cmd/grep cmd/printf cmd/rm cmd/sed cmd/test cmd/tr
  11. all: cmd/cat cmd/echo cmd/printf cmd/rm cmd/test cmd/tr
  12. @./cmd/printf '%s\n' 'Done, you should now be able to run PATH=cmd/:$$PATH ./configure && make clean && make'
  13. config.h:
  14. : >config.h
  15. .c:
  16. $(CC) -std=c99 $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDSTATIC)
  17. .c.o:
  18. $(CC) -std=c99 $(CFLAGS) -c -o $@ $<
  19. include common.mk