Commit ea8d99f6 authored by Achim Morschhauser's avatar Achim Morschhauser
Browse files

Merge branch 'testrasp' of https://gitext.gfz-potsdam.de/mors/GeomagLogger into testrasp

parents 7bcce616 0ec3a90a
SRC_DIR=src/
OBJ_DIR=lib/
HDR_DIR=include/
LIB_DIR=./lib/
USR_DIR=usr/
BIN_DIR=bin/
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
OBJ_FILES = $(patsubst $(SRC_DIR)%.cpp,$(OBJ_DIR)%.o,$(SRC_FILES))
USR_FILES = $(wildcard $(USR_DIR)*.cpp)
USR_TARGET = $(patsubst $(USR_DIR)%.cpp,%,$(USR_FILES))
#--------------------------------------
CC=g++
CCFLAGS=-g -lrt -std=c++11 -lpthread
EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.SECONDARY:
all: $(USR_TARGET:%=$(BIN_DIR)%)
%: $(BIN_DIR)%
@echo ---- DONE ----
$(BIN_DIR)%: $(USR_DIR)%.cpp $(LIB_DIR)libLogger.so
$(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)
$(LIB_DIR)libLogger.so: $(filter-out $(OBJ_DIR)$(EXCL) ,$(OBJ_FILES))
$(CC) $^ -shared -o $@
clean:
rm -f $(BIN_DIR)*
rm -f $(OBJ_DIR)*
rm -f $(LIB_DIR)libLogger.so
Makefile.static
\ No newline at end of file
SRC_DIR=src/
OBJ_DIR=lib/
HDR_DIR=include/
LIB_DIR=./lib/
USR_DIR=usr/
BIN_DIR=bin/
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
OBJ_FILES = $(patsubst $(SRC_DIR)%.cpp,$(OBJ_DIR)%.o,$(SRC_FILES))
USR_FILES = $(wildcard $(USR_DIR)*.cpp)
USR_TARGET = $(patsubst $(USR_DIR)%.cpp,%,$(USR_FILES))
#--------------------------------------
CC=g++
CCFLAGS=-g -lrt -std=c++11 -lpthread
EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.SECONDARY:
all: $(USR_TARGET:%=$(BIN_DIR)%)
%: $(BIN_DIR)%
@echo ---- DONE ----
$(BIN_DIR)%: $(USR_DIR)%.cpp $(LIB_DIR)libLogger.so
$(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)
$(LIB_DIR)libLogger.so: $(filter-out $(OBJ_DIR)$(EXCL) ,$(OBJ_FILES))
$(CC) $^ -shared -o $@
clean:
rm -f $(BIN_DIR)*
rm -f $(OBJ_DIR)*
rm -f $(LIB_DIR)libLogger.so
SRC_DIR=./src/
OBJ_DIR=./lib/
HDR_DIR=./include/
USR_DIR=./usr/
BIN_DIR=./bin/
#--------------------------------------
#--------------------------------------
SRC_FILES = $(wildcard $(SRC_DIR)*.cpp)
OBJ_FILES = $(patsubst $(SRC_DIR)%.cpp,$(OBJ_DIR)%.o,$(SRC_FILES))
USR_FILES = $(wildcard $(USR_DIR)*.cpp)
USR_TARGET = $(patsubst $(USR_DIR)%.cpp,%,$(USR_FILES))
#--------------------------------------
CC=g++
CCFLAGS=-g -lrt -std=c++11 -pthread
EXCL=driver_serial_emulate.o
# Uncomment to use virtual serial port. Run 'make clean all' afterwards
#EXCL=driver_serial.o
.SECONDARY:
all: $(USR_TARGET:%=$(BIN_DIR)%)
%: $(BIN_DIR)%
@echo ---- DONE ----
$(BIN_DIR)%: $(filter-out $(OBJ_DIR)$(EXCL) ,$(OBJ_FILES)) $(USR_DIR)%.cpp
$(CC) $(CCFLAGS) -o $(@) $^ -I./include/
$(OBJ_DIR)%.o: $(SRC_DIR)%.cpp
$(CC) $(CCFLAGS) -c -o $@ $< -I$(HDR_DIR)
clean:
rm $(BIN_DIR)*
rm $(OBJ_DIR)*
......@@ -13,15 +13,17 @@ The software is under development, and contributions for improvement as well as
To compile the software package, call 'make' in the directory where the makefile is located. Your preferred compiler can be specified in the makefile. Also, a virtual serial driver exists, that can be loaded when the EXCL variable is changed in the makefile.
The structure of folders in this directory is as follows:
/DOC Contains automatically generated documentation
/UML Simple UML diagram (can be viewed with umbrello)
/lib Compiled static library files
/include C++ header files
/src C++ source files
/usr C++ source files for user programs
/bin Contains compiled binaries of user programs
DOCFILE Directives for automatic generation of documentation using doxygen
LICENSE Creative Commons Attribution-NonCommercial 4.0 International License
makefile make directives.
/DOC Contains automatically generated documentation
/UML ContainSimple UML diagram (can be viewed with umbrello)
/lib ContainCompiled static library files
/include ContainC++ header files
/src ContainC++ source files
/usr ContainC++ source files for user programs
/bin ContainContains compiled binaries of user programs
DOCFILE ContainDirectives for automatic generation of documentation using doxygen
LICENSE ContainCreative Commons Attribution-NonCommercial 4.0 International License
Makefile.static Make directives using static libraries.
Makefile.dynamic Make directives using dynamic libraries. Not working with RPi3 and Stretch
Makefile Symlink to used makefile.
Supports Markdown
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