-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlinux.mk
More file actions
executable file
·38 lines (29 loc) · 969 Bytes
/
Copy pathlinux.mk
File metadata and controls
executable file
·38 lines (29 loc) · 969 Bytes
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
#平台是否支持C++
#Makefile全局参数
MAKEFLAGS += -rR --no-print-directory
#TOOL_CHAIN_HOST目标平台编译链
ifdef TARGET_CROSS_HOST
TOOL_CHAIN = $(TARGET_CROSS_HOST)-
endif
#makfile编译相关变量
export CC := $(TOOL_CHAIN)gcc
export CXX := $(TOOL_CHAIN)g++
export LD := $(TOOL_CHAIN)ld
export NM := $(TOOL_CHAIN)nm
export AR := $(TOOL_CHAIN)ar
export RM := rm
export Q := @
export MAKE := make
export MKDIR := mkdir
export CP := cp
export OBJCOPY := $(TOOL_CHAIN)objcopy
export STRIP := $(TOOL_CHAIN)strip
export RM := rm -rf
export ECHO := echo
export INSTALL := /usr/bin/install
#全局C_FLAGS
DBG_CFLAGS := -g -fstack-protector -fstack-protector-all -feliminate-unused-debug-types -Wno-int-to-pointer-cast
C_FLAGS += -O2 $(DBG_CFLAGS) -D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -Wall \
-pipe
#c版本
C_FLAGS += -ldl -lm -lpthread -lrt