blob: ea4207684d16ca99f407f5fa420f02830fbfcfe5 [file] [log] [blame]
lh758261d2023-07-13 05:52:04 -07001
2include $(COMMON_BASE_MK)
3
4NAME=dlt-daemon
5SRC_DIR=dlt-daemon-2.18.8
6INSTALL_DIR=$(APP_DIR)/$(NAME)/install
7BUILD_DIR=$(SRC_DIR)/build
8GEN_MAKEFILE=$(BUILD_DIR)/Makefile
9
10CONFIG_OPTS = -DCMAKE_SYSTEM_NAME=Linux
11CONFIG_OPTS += -DCMAKE_SYSTEM_PROCESSOR=arm
12CONFIG_OPTS += -DCMAKE_C_COMPILER=$(CROSS_COMPILE_PREFIX)gcc
13CONFIG_OPTS += -DCMAKE_CXX_COMPILER=$(CROSS_COMPILE_PREFIX)g++
14CONFIG_OPTS += -DCMAKE_AR=$(CROSS_COMPILE_PREFIX)ar
15CONFIG_OPTS += -DCMAKE_C_FLAGS=" -march=armv7-a -g "
16CONFIG_OPTS += -DCMAKE_CXX_FLAGS=" -march=armv7-a -g "
17CONFIG_OPTS += -DCMAKE_C_LINK_FLAGS=" -march=armv7-a "
18CONFIG_OPTS += -DCMAKE_CXX_LINK_FLAGS=" -march=armv7-a "
19CONFIG_OPTS += -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR)
20CONFIG_OPTS += -DCMAKE_INSTALL_LIBDIR=$(INSTALL_DIR)/lib
21CONFIG_OPTS += -DCONFIGURATION_FILES_DIR=$(INSTALL_DIR)/etc
22CONFIG_OPTS += -DRT_LIBRARY=$(CROSS_COMPILE_RT_LIBRARY)
23
24CONFIG_OPTS += -DWITH_SYSTEMD=OFF
25CONFIG_OPTS += -DWITH_SYSTEMD_WATCHDOG=OFF
26CONFIG_OPTS += -DWITH_SYSTEMD_JOURNAL=OFF
27CONFIG_OPTS += -DWITH_DOC=OFF
28CONFIG_OPTS += -DWITH_MAN=OFF
29CONFIG_OPTS += -DWITH_DLT_ADAPTOR=OFF
30CONFIG_OPTS += -DWITH_DLT_CONSOLE=OFF
31CONFIG_OPTS += -DWITH_DLT_EXAMPLES=OFF
32CONFIG_OPTS += -DWITH_DLT_SYSTEM=OFF
33CONFIG_OPTS += -DWITH_DLT_DBUS=OFF
34CONFIG_OPTS += -DWITH_DLT_TESTS=ON
35CONFIG_OPTS += -DWITH_DLT_UNIT_TESTS=OFF
36CONFIG_OPTS += -DWITH_DLT_SHM_ENABLE=OFF
37CONFIG_OPTS += -DWITH_DLTTEST=OFF
38CONFIG_OPTS += -DWITH_DLT_PKGCONFIG=ON
39CONFIG_OPTS += -DWITH_DLT_CXX11_EXT=OFF
40CONFIG_OPTS += -DWITH_DLT_COREDUMPHANDLER=OFF
41CONFIG_OPTS += -DWITH_DLT_KPI=OFF
42CONFIG_OPTS += -DWITH_DLT_FATAL_LOG_TRAP=OFF
43CONFIG_OPTS += -DWITH_CHECK_CONFIG_FILE=OFF
44CONFIG_OPTS += -DWITH_TESTSCRIPTS=OFF
45CONFIG_OPTS += -DWITH_GPROF=OFF
46CONFIG_OPTS += -DWITH_DLT_USE_IPv6=ON
47CONFIG_OPTS += -DDLT_USER=genivi
48CONFIG_OPTS += -DBUILD_SHARED_LIBS=ON
49CONFIG_OPTS += -DTARGET_CPU_NAME=
50#CONFIG_OPTS += -DCMAKE_INSTALL_PREFIX=/usr
51CONFIG_OPTS += -DCMAKE_BUILD_TYPE=RelWithDebInfo
52CONFIG_OPTS += -DCMAKE_HOST_SYSTEM_PROCESSOR=x86_64
53CONFIG_OPTS += -DCMAKE_SYSTEM_PROCESSOR=arm
54CONFIG_OPTS += -DWITH_DLT_LOGSTORAGE_CTRL_UDEV=OFF
55CONFIG_OPTS += -DDLT_IPC=UNIX_SOCKET
56CONFIG_OPTS += -DWITH_UDP_CONNECTION=OFF
57CONFIG_OPTS += -DWITH_DLT_DISABLE_MACRO=OFF
58
59CONFIG_OPTS += -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
60
61
62all: $(GEN_MAKEFILE)
63 make -C $(BUILD_DIR) all
64 make -C $(BUILD_DIR) install
65
66$(GEN_MAKEFILE):
67 mkdir -p $(BUILD_DIR)
68 cd $(BUILD_DIR); cmake $(CONFIG_OPTS) ..
69
70clean:
71 -rm -fr $(BUILD_DIR) $(INSTALL_DIR)
72
73romfs:
74 $(ROMFSINST) $(INSTALL_DIR)/bin/dlt-daemon /bin/dlt-daemon
75 $(ROMFSINST) $(INSTALL_DIR)/bin/dlt-test-user /bin/dlt-test-user
76 $(ROMFSINST) $(INSTALL_DIR)/etc/dlt.conf /etc/dlt.conf
77 cd $(INSTALL_DIR)/lib; \
78 for i in *.so*; do \
79 if [ -L $$i ]; then \
80 $(ROMFSINST) -s `find $$i -printf %l` /lib/$$i; \
81 elif [ -f $$i ]; then \
82 $(ROMFSINST) /lib/$$i; \
83 fi; \
84 done