oh
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.

makefile 506B

1234567891011121314151617181920212223242526272829
  1. CC = gcc
  2. OUT = bin
  3. PROG = tivien
  4. SEARCHPATH += src
  5. CFLAGS += `sdl2-config --cflags` -g -lefence
  6. LDFLAGS += `sdl2-config --libs` -lSDL2_mixer -lSDL2_ttf -lSDL2_image -lm
  7. vpath %.c $(SEARCHPATH)
  8. vpath %.h $(SEARCHPATH)
  9. _OBJS += main.o
  10. _OBJS += piece.o string.o util.o bag.o playfield.o
  11. OBJS = $(patsubst %,$(OUT)/%,$(_OBJS))
  12. all: $(PROG)
  13. $(PROG): $(OBJS)
  14. $(CC) -o $@ $(OBJS) $(LDFLAGS)
  15. $(OUT)/%.o: %.c
  16. @mkdir -p $(OUT)
  17. $(CC) $(CFLAGS) -c -o $@ $<
  18. .PHONY: clean
  19. clean:
  20. $(RM) -rf $(OUT) $(PROG)