src/chess/Makefile

changeset 34
c4d4b8a8f902
parent 32
8a0b85303ee8
child 50
41017d0a72c5
equal deleted inserted replaced
33:866025982aa9 34:c4d4b8a8f902
40 SRC += rules.c 40 SRC += rules.c
41 41
42 OBJ = $(SRC:%.c=$(BUILDDIR)/release/%$(OBJ_EXT)) 42 OBJ = $(SRC:%.c=$(BUILDDIR)/release/%$(OBJ_EXT))
43 OBJ_D = $(SRC:%.c=$(BUILDDIR)/debug/%$(OBJ_EXT)) 43 OBJ_D = $(SRC:%.c=$(BUILDDIR)/debug/%$(OBJ_EXT))
44 44
45 all: $(OBJ) 45 all: $(BUILDDIR)/release $(OBJ)
46 $(AR) $(ARFLAGS) $(BUILDDIR)/release/chess$(LIB_EXT) $(OBJ) 46 $(AR) $(ARFLAGS) $(BUILDDIR)/release/chess$(LIB_EXT) $(OBJ)
47 47
48 debug: $(OBJ_D) 48 debug: $(BUILDDIR)/debug $(OBJ_D)
49 $(AR) $(ARFLAGS) $(BUILDDIR)/debug/chess$(LIB_EXT) $(OBJ_D) 49 $(AR) $(ARFLAGS) $(BUILDDIR)/debug/chess$(LIB_EXT) $(OBJ_D)
50 50
51 $(BUILDDIR)/release/%$(OBJ_EXT): %.c $(BUILDDIR)/release 51 $(BUILDDIR)/release/%$(OBJ_EXT): %.c
52 $(CC) -o $@ $(CFLAGS) -c $< 52 $(CC) -o $@ $(CFLAGS) -c $<
53 53
54 $(BUILDDIR)/debug/%$(OBJ_EXT): %.c $(BUILDDIR)/debug 54 $(BUILDDIR)/debug/%$(OBJ_EXT): %.c
55 $(CC) -o $@ $(CFLAGS_D) -c $< 55 $(CC) -o $@ $(CFLAGS_D) -c $<
56 56
57 $(BUILDDIR): 57 $(BUILDDIR):
58 $(MKDIR) $(MKDIRFLAGS) $(BUILDDIR) 58 $(MKDIR) $(MKDIRFLAGS) $(BUILDDIR)
59 59

mercurial