-
Notifications
You must be signed in to change notification settings - Fork 201
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (34 loc) · 810 Bytes
/
Copy pathMakefile
File metadata and controls
41 lines (34 loc) · 810 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
37
38
39
40
41
#GITREV = -D'GITREV="$(shell git log -1 --pretty=format:"%h by %an on %ai")"'
BLDDEF = -D'BUILDTS="$(shell date +"%y%m%d %H:%M:%S %z")"'
#Set Architecture
ARCH := arm-v7
DEVEL := rel
LIBS := -lcurl -lboost_regex
#Compilers
ifeq ($(ARCH),arm-v7)
CC := g++-4.8 -mcpu=cortex-a7 -mfpu=neon-vfpv4 -mfloat-abi=hard
else
ifeq ($(ARCH),arm)
CC := g++ -mcpu=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard
else
ifeq ($(ARCH),x86)
CC := g++ -m32
OUTPUT := x86/
else
CC := g++
OUTPUT := x64/
endif
endif
endif
#devel flags
ifeq ($(BUILD),devel)
FLAGS := -g -Wall
else
FLAGS := -O3
endif
download: download.cpp downconn.cpp downconn.h
$(CC) $(BLDDEF) $(FLAGS) $(LIBS) -o $(addprefix $(OUTPUT), download) downconn.cpp download.cpp
clean:
rm *.o download 2>/dev/null
install: download
install download /usr/bin/download