forked from cms-gem-daq-project/xhal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile_ctp7
42 lines (31 loc) · 1.09 KB
/
Makefile_ctp7
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
include xcompile/apps.common.mk
ADDFLAGS=-std=gnu++14
IncludeDirs = ${XHAL_ROOT}/include
IncludeDirs += ${XHAL_ROOT}/xcompile/xerces-c-3.1.4/src
IncludeDirs += ${XHAL_ROOT}/xcompile/log4cplus-1.1.2/include
INC=$(IncludeDirs:%=-I%)
Libraries+= -llog4cplus -lxerces-c -lstdc++
LibraryDirs+=-L${XHAL_ROOT}/lib/arm
LIB=$(LibraryDirs)
LIB+= $(Libraries)
LDFLAGS= -shared
SRCS_XHAL = $(shell echo src/common/utils/*.cpp)
OBJS_XHAL = $(SRCS_XHAL:.cpp=.o)
OBJS_RW = xcompile/lib_rw_ctp7/libmemsvc.o xcompile/lib_rw_ctp7/rwreg.o
XHAL_LIB=${XHAL_ROOT}/lib/arm/libxhal.so
RW_LIB=${XHAL_ROOT}/lib/arm/librwreg.so
all:${XHAL_LIB} ${RW_LIB}
utils:${XHAL_LIB}
$(XHAL_LIB): $(OBJS_XHAL)
$(CC) $(CFLAGS) $(ADDFLAGS) ${LDFLAGS} $(INC) $(LIB) -o $@ $^
$(OBJS_XHAL):$(SRCS_XHAL)
$(CC) $(CFLAGS) $(ADDFLAGS) $(INC) $(LIB) -c -o $@ $<
$(RW_LIB): $(OBJS_RW)
$(CXX) -std=c++0x $(LDFLAGS) -fnon-call-exceptions -shared -o $@ $(OBJS_RW)
%.o: %.c
$(CC) -std=gnu99 -c $(CFLAGS) -o $@ $<
%.o: %.cc
$(CXX) -std=c++0x -c $(CFLAGS) -o $@ $<
.PHONY: clean
clean:
-${RM} ${XHAL_LIB} ${OBJS_XHAL} ${RW_LIB} ${OBJS_RW}