-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_B_CM
46 lines (30 loc) · 947 Bytes
/
Makefile_B_CM
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
SRC_DIR=./src
INC_DIR=./inc
LIB_DIR=./lib
BUILD_DIR=./build
BIN_DIR=./bin
CPP=g++
LIB_FLAGS=-ldbus-1 -lconfig++
CPP_FLAGS= -g -std=c++11 -pthread -lgrt -lncurses -ltinfo -lstdc++ -lbluetooth#-Wall #-pedantic
EXTERN = ./externAssets
GRT_LIB = /grt/lib/
GRT_INC = /grt/include
DBUS_INC=-I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include
LIB=-L/usr/lib64 -L$(EXTERN)$(GRT_LIB)
INCLUDE=-I$(INC_DIR) $(DBUS_INC) -I$(EXTERN)$(GRT_INC)
main: $(BIN_DIR)/main
BINARIES=main
all:$(BINARIES)
$(BIN_DIR)/%: $(BUILD_DIR)/grConnection.o $(BUILD_DIR)/grAlgorithm.o $(BUILD_DIR)/grUtilities.o $(BUILD_DIR)/%.o
$(CPP) $(CPP_FLAGS) $(LIB) $(INCLUDE) $^ -o $@ $(LIB_FLAGS)
$(BUILD_DIR)/%.o: $(SRC_DIR)/%.cpp
$(CPP) $(CPP_FLAGS) $(LIB) $(INCLUDE) -c $^ -o $@ $(LIB_FLAGS)
#clean rules
#.PHONY: clean cleanobj cleanbin
clean:
rm -vf $(BIN_DIR)/*
rm -vf $(BUILD_DIR)/*
cleanobj:
rm -vf $(BUILD_DIR)/*
cleanbin:
rm -vf $(BIN_DIR)/*