src/Makefile

changeset 32
8a0b85303ee8
parent 19
6a26114297a1
child 34
c4d4b8a8f902
equal deleted inserted replaced
31:ed440bcd9740 32:8a0b85303ee8
33 SRC += input.c 33 SRC += input.c
34 SRC += server.c 34 SRC += server.c
35 SRC += client.c 35 SRC += client.c
36 SRC += game.c 36 SRC += game.c
37 37
38 OBJ = $(SRC:%.c=../build/%$(OBJ_EXT)) 38 OBJ = $(SRC:%.c=../build/release/%$(OBJ_EXT))
39 OBJ_D = $(SRC:%.c=../build/debug/%$(OBJ_EXT))
39 40
40 all: $(OBJ) 41 all: $(OBJ)
41 $(LD) -o ../build/$(BIN) $^ ../build/chess$(LIB_EXT) $(LDFLAGS) 42 $(LD) -o ../build/release/$(BIN) $^ \
42 43 ../build/release/chess$(LIB_EXT) $(LDFLAGS)
43 44
44 ../build/%$(OBJ_EXT): %.c 45 debug: $(OBJ_D)
46 $(LD) -o ../build/debug/$(BIN) $^ \
47 ../build/debug/chess$(LIB_EXT) $(LDFLAGS)
48
49 ../build/release/%$(OBJ_EXT): %.c ../build/release
45 $(CC) -o $@ $(CFLAGS) -c $< 50 $(CC) -o $@ $(CFLAGS) -c $<
46 51
52 ../build/debug/%$(OBJ_EXT): %.c ../build/debug
53 $(CC) -o $@ $(CFLAGS_D) -c $<
54
55 ../build/release:
56 $(MKDIR) $(MKDIRFLAGS) ../build/release
57
58 ../build/debug:
59 $(MKDIR) $(MKDIRFLAGS) ../build/debug
60

mercurial