--- a/src/chess/Makefile Tue Aug 28 13:45:22 2018 +0200 +++ b/src/chess/Makefile Tue Aug 28 14:03:09 2018 +0200 @@ -26,10 +26,7 @@ # POSSIBILITY OF SUCH DAMAGE. # -BUILDDIR = ../build -CONFIG = conf.mk - -include $(CONFIG) +include ../../conf.mk SRC += pawn.c SRC += rook.c @@ -40,29 +37,14 @@ SRC += rules.c SRC += pgn.c -OBJ = $(SRC:%.c=$(BUILDDIR)/release/%$(OBJ_EXT)) -OBJ_D = $(SRC:%.c=$(BUILDDIR)/debug/%$(OBJ_EXT)) +OBJ = $(SRC:%.c=$(BUILDDIR)/%$(OBJ_EXT)) -all: $(BUILDDIR)/release $(OBJ) - $(AR) $(ARFLAGS) $(BUILDDIR)/release/chess$(LIB_EXT) $(OBJ) +all: $(BUILDDIR) $(OBJ) + $(AR) $(ARFLAGS) $(BUILDDIR)/chess$(LIB_EXT) $(OBJ) -debug: $(BUILDDIR)/debug $(OBJ_D) - $(AR) $(ARFLAGS) $(BUILDDIR)/debug/chess$(LIB_EXT) $(OBJ_D) - -$(BUILDDIR)/release/%$(OBJ_EXT): %.c +$(BUILDDIR)/%$(OBJ_EXT): %.c $(CC) -o $@ $(CFLAGS) -c $< -$(BUILDDIR)/debug/%$(OBJ_EXT): %.c - $(CC) -o $@ $(CFLAGS_D) -c $< - $(BUILDDIR): $(MKDIR) $(MKDIRFLAGS) $(BUILDDIR) - -clear: - $(RM) $(RMFLAGS) $(BUILDDIR) - - $(BUILDDIR)/release: - $(MKDIR) $(MKDIRFLAGS) $(BUILDDIR)/release - - $(BUILDDIR)/debug: - $(MKDIR) $(MKDIRFLAGS) $(BUILDDIR)/debug + \ No newline at end of file