Makefile 632 B

1234567891011121314151617181920212223242526272829
  1. CFLAGS= -Ofast -I"include"
  2. BIN=cts
  3. all: main
  4. staticgen: colors.o src/dbquery.c
  5. echo "\nCompiling executable as static page generator\n"
  6. gcc -c src/dbquery.c $(CFLAGS) -DSTATICGEN
  7. gcc -c src/main.c $(CFLAGS) -DSTATICGEN
  8. gcc colors.o dbquery.o main.o -lsqlite3 -o $(BIN)
  9. main: main.o
  10. gcc colors.o dbquery.o main.o -lsqlite3 -o $(BIN)
  11. main.o: dbquery.o src/main.c
  12. gcc -c src/main.c $(CFLAGS)
  13. dbquery.o: colors.o src/dbquery.c
  14. gcc -c src/dbquery.c $(CFLAGS)
  15. colors.o: src/colors.c
  16. gcc -c src/colors.c $(CFLAGS)
  17. testcolor: src/colors.c src/tcolor.c
  18. gcc src/colors.c src/tcolor.c -o tcolor -I"includes" -g
  19. clean:
  20. rm *.o