Makefile 702 B

1234567891011121314151617181920212223242526272829303132
  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. colors4python:
  10. gcc $(CFLAGS) src/colors.c -o colors -DCOLORS4PYTHON
  11. main: main.o
  12. gcc colors.o dbquery.o main.o -lsqlite3 -o $(BIN)
  13. main.o: dbquery.o src/main.c
  14. gcc -c src/main.c $(CFLAGS)
  15. dbquery.o: colors.o src/dbquery.c
  16. gcc -c src/dbquery.c $(CFLAGS)
  17. colors.o: src/colors.c
  18. gcc -c src/colors.c $(CFLAGS)
  19. testcolor: src/colors.c src/tcolor.c
  20. gcc src/colors.c src/tcolor.c -o tcolor -I"includes" -g
  21. clean:
  22. rm *.o