Commit 105f860b authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

Makefile

parent 6b76c95a
......@@ -6,6 +6,8 @@ LIB_DIR=./lib/
USE_SRC_DIR=usr/src/
USR_BIN_DIR=bin/
MKDIR=mkdir -p
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
......@@ -21,17 +23,20 @@ EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.PHONY: dirs $(LIB_DIR) $(USR_BIN_DIR)
.SECONDARY:
all: $(LIB_DIR)libLogger.so $(USR_TARGET:%=$(USR_BIN_DIR)%)
all: dirs $(LIB_DIR)libLogger.so $(USR_TARGET:%=$(USR_BIN_DIR)%)
dirs: $(LIB_DIR) $(USR_BIN_DIR)
$(MKDIR) $?
%: $(USR_BIN_DIR)%
@echo ---- DONE ----
$(USR_BIN_DIR)%: $(USE_SRC_DIR)%.cpp
$(CC) $(CCFLAGS) -no-pie $< -o $@ -I$(HDR_DIR) -L$(LIB_DIR) -Wl,-rpath,"\$$ORIGIN/../$(LIB_DIR)" -lLogger
# $(CC) $(CCFLAGS) $< -o $@ -I$(HDR_DIR) -L$(LIB_DIR) -lLogger
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
$(CC) $(CCFLAGS) -fPIC -c -o $@ $< -I$(HDR_DIR)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment