src/chess/Makefile

changeset 34
c4d4b8a8f902
parent 32
8a0b85303ee8
child 50
41017d0a72c5
--- a/src/chess/Makefile	Wed Apr 09 11:12:04 2014 +0200
+++ b/src/chess/Makefile	Wed Apr 09 12:07:47 2014 +0200
@@ -42,16 +42,16 @@
 OBJ = $(SRC:%.c=$(BUILDDIR)/release/%$(OBJ_EXT))
 OBJ_D = $(SRC:%.c=$(BUILDDIR)/debug/%$(OBJ_EXT))
 
-all: $(OBJ)
+all: $(BUILDDIR)/release $(OBJ)
 	$(AR) $(ARFLAGS) $(BUILDDIR)/release/chess$(LIB_EXT) $(OBJ)
 
-debug: $(OBJ_D)
+debug: $(BUILDDIR)/debug $(OBJ_D)
 	$(AR) $(ARFLAGS) $(BUILDDIR)/debug/chess$(LIB_EXT) $(OBJ_D)	
 
-$(BUILDDIR)/release/%$(OBJ_EXT): %.c $(BUILDDIR)/release
+$(BUILDDIR)/release/%$(OBJ_EXT): %.c
 	$(CC) -o $@ $(CFLAGS) -c $<
 	
-$(BUILDDIR)/debug/%$(OBJ_EXT): %.c $(BUILDDIR)/debug
+$(BUILDDIR)/debug/%$(OBJ_EXT): %.c
 	$(CC) -o $@ $(CFLAGS_D) -c $<
 
 $(BUILDDIR):

mercurial