-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
73 lines (47 loc) · 1.73 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
CC =F:\\MentorGraphics\\Sourcery_CodeBench_Lite_for_ARM_GNU_Linux\\bin\\arm-none-linux-gnueabi-gcc
CFLAGS = -c -O2
LD_FLAGS = -ldsi_netctrl \
-lqdi \
-lqmi_client_helper \
-lqmi -lqmiservices -lqmi_client_qmux -lqmiidl \
-lqmi_csi -lqmi_common_so -lqmi_cci -lqmi_sap -lqmi_encdec \
-lnetmgr -lrmnetctl -ldiag -lconfigdb -lxml -ldsutils \
-ltime_genoff -lgthread-2.0 -lglib-2.0
MAIN_DIR = .
TARGET_BIN_DIR = $(MAIN_DIR)/bin
TARGET_OBJ_DIR = $(MAIN_DIR)/obj
BIN_NAME = demo_data_call
TEST_DIR = $(MAIN_DIR)
SRC_DIR = $(TEST_DIR)
INCLUDE_PREFIX = -I
LINK_PREFIX = -L
ALL_PATHS = $(SRC_DIR)
ALL_PATHS += ./include/qmi-framework
ALL_PATHS += ./include/qmi
ALL_PATHS += ./include/data
ALL_INCLUDES = $(addprefix $(INCLUDE_PREFIX), $(ALL_PATHS))
ALL_LINKS = $(addprefix $(LINK_PREFIX), ./simcomlib)
OBJ_CMD = -o
LD_CMD = -o
TEST_OBJS = $(TARGET_OBJ_DIR)/demo_data_call.o \
BIN_OBJS = $(TEST_OBJS)
$(TARGET_OBJ_DIR)/%.o:$(TEST_DIR)/%.c
@echo ---------------------------------------------------------
@echo $(ALL_PATHS)
@echo $(ALL_INCLUDES)
@echo Build OBJECT $(@) from SOURCE $<
@$(CC) $(CFLAGS) $(ALL_INCLUDES) $(OBJ_CMD) $@ $<
@echo ---------------------------------------------------------
.PHONY: all clean
all:prep bin
prep:
@if test ! -d $(TARGET_BIN_DIR); then mkdir $(TARGET_BIN_DIR); fi
@if test ! -d $(TARGET_OBJ_DIR); then mkdir $(TARGET_OBJ_DIR); fi
bin:$(BIN_OBJS)
@echo ---------------------------------------------------------
@echo $(ALL_LINKS)
@echo Create bin file $(BIN_NAME)
@$(CC) $(ALL_LINKS) -lpthread $(LD_FLAGS) $(LD_CMD) $(TARGET_BIN_DIR)/$(BIN_NAME) $^
@echo ---------------------------------------------------------
clean:
@rm -fr $(TARGET_OBJ_DIR) $(TARGET_BIN_DIR)