forked from BuLogics/libMSP430
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (57 loc) · 2.18 KB
/
Makefile
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
CXX:= g++
DEFINES := -DUNIX
CXXFLAGS := -fPIC
BOOST_DIR := $(PWD)/../boost_1_51_0
#CXXFLAGS := -fPIC -m32
ifdef DEBUG
CXXFLAGS += -g -O0
else
CXXFLAGS += -Os
DEFINES += -DNDEBUG
endif
INCLUDES := \
-I./Bios/include \
-I./HalObjectDb/include \
-I./DLL430_v3/include \
-I./DLL430_v3/include/DLL430 \
-I./DLL430_v3/src \
-I./DLL430_v3/src/TI/DLL430
LIBDIRS :=
ifdef BOOST_DIR
INCLUDES += -I$(BOOST_DIR)
LIBDIRS += -L$(BOOST_DIR)/stage/lib
endif
LIBS := -lboost_thread -lboost_filesystem -lboost_date_time -lboost_system
SRC := \
./HalObjectDb/src/HalObjectDb.cpp \
./DLL430_v3/src/DLL430v3_OS_capi.cpp \
./DLL430_v3/src/DLL430_plugin.cpp \
./DLL430_v3/src/DLL430_OldApiV3.cpp \
./DLL430_v3/src/TI/DLL430/EEM/CycleCounter.cpp \
$(wildcard ./DLL430_v3/src/TI/DLL430/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/BreakpointManager/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/CycleCounter/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/EemRegisters/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/EmulationManager/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/Exceptions/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/Sequencer/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/StateStorage430/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/Trace/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/Trigger/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/TriggerCondition/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/TriggerManager/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/EM/VariableWatch/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/logging/*.cpp) \
$(wildcard ./DLL430_v3/src/TI/DLL430/TemplateDeviceDb/*.cpp)
OBJS := $(patsubst %.cpp, %.o, $(SRC))
OUTPUT := libmsp430.so
all: $(OBJS)
# $(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(OUTPUT) -o $(OUTPUT) $(OBJS) $(LIBDIRS) -Wl,-Bstatic $(LIBS) -Wl,-Bdynamic -lpthread
$(CXX) $(CXXFLAGS) -shared -Wl,-soname,$(OUTPUT) -o $(OUTPUT) $(OBJS) $(LIBDIRS) -Wl,$(LIBS) -Wl,-Bdynamic -lpthread
%.o: %.cpp
$(CXX) -c -o $@ $< $(CXXFLAGS) $(INCLUDES) $(DEFINES)
install:
cp $(OUTPUT) /usr/lib/
clean:
@for i in $(OBJS); do rm -f $$i; done
@rm -f build.log