-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmakefile
More file actions
29 lines (27 loc) · 734 Bytes
/
makefile
File metadata and controls
29 lines (27 loc) · 734 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
CC= g++
### Directories
DEBUG = ./Debug/
Json = ./src/Json/
Com = ./src/Com/
RtCaster = ./src/RtCaster/
Rtklib =./src/Rtklib/
### Patterns
C_SRC= $(wildcard *.cpp $(Json)/*.cpp $(Com)/*.cpp $(RtCaster)/*.cpp $(Rtklib)/*.cpp)
C_OBJ= $(patsubst %.cpp,%.o,$(C_SRC))
### TMP OBJECT
TMP_OBJ= $(patsubst %.cpp,%.o,$(notdir $(C_SRC)))
F_OBJ= $(patsubst %.o,$(DEBUG)%.o,$(TMP_OBJ))
### Target
TARGET=VrsCaster
.PHONY: all clean
all:$(TARGET)
### Compiler Flags
LCFLAGS= -g -c -std=c++11
#######################################################################################
$(TARGET):$(C_OBJ)
$(CC) -o $(TARGET) $(TMP_OBJ) -lpthread -lm
mv $(TMP_OBJ) $(DEBUG)
%.o:%.cpp
$(CC) $(LCFLAGS) $<
clean:
rm $(F_OBJ) $(TARGET) $(TMP_OBJ)