diff --git a/c/Makefile b/c/Makefile index 4596199..30c7aca 100644 --- a/c/Makefile +++ b/c/Makefile @@ -2,16 +2,16 @@ include config.mk OBJ = ${SRC:.c=.o} -all: ${OBJ} ${BIN} +all: ${OBJ} ${OUT} %.o: %.c ${CC} -o $@ -c ${CFLAGS} $< clean: - rm -f ${OBJ} ${BIN} + rm -f ${OBJ} ${OUT} -ifneq (${BIN},) -${BIN}: ${OBJ} +ifneq (${OUT},) +${OUT}: ${OBJ} ${CC} -o "$@" ${LDFLAGS} $^ endif diff --git a/c/config.mk b/c/config.mk index 50742d7..79375c1 100644 --- a/c/config.mk +++ b/c/config.mk @@ -22,7 +22,7 @@ LIB =\ INCDIR =\ src/project/ -BIN = project +OUT = project # Conditionals / Appends LDFLAGS +=\ diff --git a/cxx/Makefile b/cxx/Makefile index 2d5f5bc..2fed3d1 100644 --- a/cxx/Makefile +++ b/cxx/Makefile @@ -2,16 +2,16 @@ include config.mk OBJ = ${SRC:.cpp=.o} -all: ${OBJ} ${BIN} +all: ${OBJ} ${OUT} %.o: %.cpp ${CXX} -o $@ -c ${CXXFLAGS} $< clean: - rm -f ${OBJ} ${BIN} + rm -f ${OBJ} ${OUT} -ifneq (${BIN},) -${BIN}: ${OBJ} +ifneq (${OUT},) +${OUT}: ${OBJ} ${CXX} -o "$@" ${LDFLAGS} $^ endif diff --git a/cxx/config.mk b/cxx/config.mk index 0a49684..189d861 100644 --- a/cxx/config.mk +++ b/cxx/config.mk @@ -21,7 +21,7 @@ LIB =\ INCDIR =\ src/project/ -BIN = project +OUT = project # Conditionals / Appends LDFLAGS +=\