Makefile 633 B

123456789101112131415161718192021222324
  1. SRC = console-read.c drums3.c echo.c helloworld.c logring.c pager.c\
  2. drums2.c drums.c ioctl.c uid-filter.c
  3. OBJ = console-read.o drums3.o echo.o helloworld.o logring.o pager.o\
  4. drums2.o drums.o ioctl.o uid-filter.o
  5. TARGETS = console-read drums3 echo helloworld logring pager\
  6. drums2 drums ioctl uid-filter
  7. default: $(TARGETS)
  8. install: $(TARGETS)
  9. clean:
  10. rm -f *.o *.d $(TARGETS) gmon.out *~
  11. $(TARGETS): %: %.c
  12. $(CC) $(GCF) $< -o $@ ../libfusd/libfusd.a
  13. %.d: %.c
  14. $(CC) -M $(CFLAGS) $< > $@.$$$$; sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; rm -f $@.$$$$
  15. ifeq ($(MAKECMDGOALS),target)
  16. include $(SRC:.c=.d)
  17. endif