You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

51 lines
1.1 KiB

  1. UNAME:=$(shell uname)
  2. ifneq ($(UNAME),OpenBSD)
  3. LDFLAGS=-ldl
  4. CFLAGS=-O
  5. else
  6. LDFLAGS=$(shell sdl-config --libs) -dynamic
  7. CFLAGS=$(shell sdl-config --cflags) -O
  8. endif
  9. WARNINGS=-Wall -Wextra -Wformat -Wpointer-sign -Wsign-compare
  10. all : main dummy ai guidemo
  11. api.h : dameschinoises.h dameschinoises.patch
  12. patch -o api.h dameschinoises.h dameschinoises.patch
  13. main : main.o stack.o arbitre.o gui
  14. gcc main.o stack.o arbitre.o gui.o -o main -pedantic $(LDFLAGS) -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lm $(WARNINGS)
  15. main.o : main.c api.h
  16. gcc -c main.c $(CFLAGS) $(WARNINGS)
  17. stack.o : stack.c
  18. gcc -c stack.c $(CFLAGS) $(WARNINGS)
  19. arbitre.o : arbitre.c api.h
  20. gcc -c arbitre.c $(CFLAGS) $(WARNINGS)
  21. dummy : dummy.c
  22. gcc dummy.c -o dummy -fPIC -shared -nostartfiles $(WARNINGS)
  23. .PHONY : ai
  24. ai:
  25. make -C ai
  26. gui : gui.c api.h
  27. gcc -c gui.c $(CFLAGS) $(WARNINGS)
  28. guidemo : guidemo.c gui
  29. gcc guidemo.c gui.o -o guidemo $(CFLAGS) $(LDFLAGS) -lSDL -lSDL_image -lSDL_gfx -lSDL_ttf -lm $(WARNINGS)
  30. clean :
  31. rm -f *.o
  32. make -C ai clean
  33. mrproper :
  34. rm -f *.o api.h main dummy guidemo
  35. make -C ai mrproper