Makefile 557 B

123456789101112131415161718192021222324252627
  1. CFLAGS = -Wall
  2. BINARIES = execveat
  3. DEPS = execveat.symlink execveat.denatured script subdir
  4. all: $(BINARIES) $(DEPS)
  5. subdir:
  6. mkdir -p $@
  7. script:
  8. echo '#!/bin/sh' > $@
  9. echo 'exit $$*' >> $@
  10. chmod +x $@
  11. execveat.symlink: execveat
  12. ln -s -f $< $@
  13. execveat.denatured: execveat
  14. cp $< $@
  15. chmod -x $@
  16. %: %.c
  17. $(CC) $(CFLAGS) -o $@ $^
  18. TEST_PROGS := execveat
  19. # Makefile is a run-time dependency, since it's accessed by the execveat test
  20. TEST_FILES := $(DEPS) Makefile
  21. include ../lib.mk
  22. clean:
  23. rm -rf $(BINARIES) $(DEPS) subdir.moved execveat.moved xxxxx*