Makefile 712 B

1234567891011121314151617181920212223242526272829
  1. ifneq ($(SCHED),)
  2. CFLAGS+=-DEDF
  3. endif
  4. CFLAGS+=-Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-security -Wimplicit-fallthrough=3
  5. CFLAGS+=-Wtraditional-conversion -Wconversion -fno-strict-aliasing
  6. CFLAGS+=-Wno-unused-parameter -Wcast-qual -Wformat-signedness -Wshadow -Wtrampolines
  7. CFLAGS+=-Wshift-overflow=2 -Wstringop-overflow=4 -Wstrict-overflow=4 -Warray-bounds=2
  8. CFLAGS+=-Wlogical-op -Wduplicated-cond -Wduplicated-branches -Wcast-align=strict -Wswitch-default -Wswitch-enum
  9. CFLAGS+=-D_FORTIFY_SOURCE=2 -O2 -Wall
  10. SOURCES=main.c
  11. OBJ=${SOURCES:.c=.o}
  12. PROG=tfd
  13. .PHONY: all
  14. all: $(PROG)
  15. $(PROG): $(OBJ)
  16. $(CC) $^ -o $@
  17. .c:
  18. $(CC) $(CFLAGS) $< -o $@
  19. .PHONY: clean
  20. clean:
  21. rm -f $(PROG) *.o