Makefile 820 B

1234567891011121314151617181920212223242526272829303132333435
  1. CFLAGS= -Ofast -I"include"
  2. BIN=cts
  3. all: colors4python staticgen
  4. # build for static page generator
  5. staticgen: colors.o src/dbquery.c
  6. echo "\nCompiling executable as static page generator\n"
  7. gcc -c src/dbquery.c $(CFLAGS) -DSTATICGEN
  8. gcc -c src/main.c $(CFLAGS) -DSTATICGEN
  9. gcc colors.o dbquery.o main.o -lsqlite3 -o $(BIN)
  10. # used by python script to colorize names (html)
  11. colors4python:
  12. gcc $(CFLAGS) src/colors.c -o colors -DCOLORS4PYTHON
  13. # build for cgi
  14. cgi: main.o
  15. gcc colors.o dbquery.o main.o -lsqlite3 -o $(BIN)
  16. main.o: dbquery.o src/main.c
  17. gcc -c src/main.c $(CFLAGS)
  18. dbquery.o: colors.o src/dbquery.c
  19. gcc -c src/dbquery.c $(CFLAGS)
  20. colors.o: src/colors.c
  21. gcc -c src/colors.c $(CFLAGS)
  22. testcolor: src/colors.c src/tcolor.c
  23. gcc src/colors.c src/tcolor.c -o tcolor -I"includes" -g
  24. clean:
  25. rm *.o