From f276753dc9a18c89432ad846bcecba06b642f708 Mon Sep 17 00:00:00 2001 From: Alex Denes Date: Sun, 21 Nov 2021 17:34:37 +0000 Subject: [PATCH] Rename BIN to OUT, as the output of the compilation might also be something else --- c/Makefile | 8 ++++---- c/config.mk | 2 +- cxx/Makefile | 8 ++++---- cxx/config.mk | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) 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 +=\