src/Makefile

changeset 34
c4d4b8a8f902
parent 32
8a0b85303ee8
child 35
6c64b7a073af
--- a/src/Makefile	Wed Apr 09 11:12:04 2014 +0200
+++ b/src/Makefile	Wed Apr 09 12:07:47 2014 +0200
@@ -38,18 +38,18 @@
 OBJ = $(SRC:%.c=../build/release/%$(OBJ_EXT))
 OBJ_D = $(SRC:%.c=../build/debug/%$(OBJ_EXT))
 
-all: $(OBJ)
-	$(LD) -o ../build/release/$(BIN) $^ \
+all: ../build/release $(OBJ)
+	$(LD) -o ../build/release/$(BIN) $(OBJ) \
 	../build/release/chess$(LIB_EXT) $(LDFLAGS)
 
-debug: $(OBJ_D)
-	$(LD) -o ../build/debug/$(BIN) $^ \
+debug: ../build/debug $(OBJ_D)
+	$(LD) -o ../build/debug/$(BIN) $(OBJ_D) \
 	../build/debug/chess$(LIB_EXT) $(LDFLAGS)	
 
-../build/release/%$(OBJ_EXT): %.c ../build/release
+../build/release/%$(OBJ_EXT): %.c
 	$(CC) -o $@ $(CFLAGS) -c $<
 
-../build/debug/%$(OBJ_EXT): %.c ../build/debug
+../build/debug/%$(OBJ_EXT): %.c
 	$(CC) -o $@ $(CFLAGS_D) -c $<
 	
 ../build/release:

mercurial