-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (59 loc) · 1.94 KB
/
Copy pathMakefile
File metadata and controls
79 lines (59 loc) · 1.94 KB
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
75
76
77
78
79
################################################################################
# Env Variables setting
################################################################################
# STAGING_DIR
export STAGING_DIR = /home/ubuntu/openWRT/staging_dir
# Tool chain ver(directory name)
TOOLCHAIN = toolchain-arm_cortex-a7+vfp_gcc-4.8-linaro_uClibc-0.9.33.2_eabi
# binary PATH
PATH := $(PATH):$(STAGING_DIR)/$(TOOLCHAIN)/bin
# header and library PATH
USR = $(STAGING_DIR)/$(TOOLCHAIN)/usr
################################################################################
# Option
################################################################################
CC = arm-openwrt-linux-uclibcgnueabi-g++
INCLUDEPATH = ./
LIBS = ./
################################################################################
# Source
################################################################################
SRCS = agent.cpp
OBJS = $(SRCS:.cpp=.o)
EXECUTABLE = ow_agent
all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJS) openwrt.o Report.o Packet.o Socket.o APInformation.o
@echo [Link] $@ FROM: $^
@$(CC) -o $@ $^ -L$(LIBS) -pthread
.cpp.o:
@echo [Compile] $<
@$(CC) -o $@ $< -c -I$(INCLUDEPATH) -D DEBUG
openwrt.o : openwrt.cpp
@echo [Compile openwrt] $<
@$(CC) -c openwrt.cpp
Report.o : Report.cpp
@echo [Compile Report] $<
@$(CC) -c Report.cpp
Packet.o : Packet.cpp
@echo [Compile Packet] $<
@$(CC) -c Packet.cpp
Socket.o : Socket.cpp
@echo [Compile Socket] $<
@$(CC) -c Socket.cpp
APInformation.o : APInformation.cpp
@echo [Compile APInformation] $<
@$(CC) -c APInformation.cpp
clean:
@echo [clean]
@rm $(OBJS) -f
@rm $(EXECUTABLE) -f
@rm openwrt.o
@rm dependency -f
line:
find ./ -type f | xargs wc -l
# http://forum.falinux.com/zbxe/?document_srl=494921&mid=lecture_tip&sort_index=regdate&order_type=desc
dep :
@$(CC) -M -I$(INCLUDEPATH) $(SRCS) > dependency
ifeq (dependency,$(wildcard dependency))
include dependency
endif