-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
87 lines (52 loc) · 2.4 KB
/
Makefile
File metadata and controls
87 lines (52 loc) · 2.4 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
80
81
82
83
84
85
86
87
# Copyright (c) 2012-2016 Andy Little
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>
# You need to specify the path on the command line
# or as an environment variable
# using this variable name
# see the info below for more details
QUAN_INCLUDE_PATH =
define quan_path_not_defined_help_string
--------------------------------HELP----------------------------
To build this app requires QUAN_INCLUDE_PATH to be defined to the path to the quan library.
You can download quan as a zip from:
https://github.com/kwikius/quan-trunk/archive/master.zip
Unzip it to your favourite libs dir and then do: ( where my_path/to/quan-trunk is replced by your path)
"$$ make QUAN_INCLUDE_PATH=my_path/to/quan-trunk"
or do:
"$$ export QUAN_INCLUDE_PATH=my_path/to/quan-trunk"
"$$ make"
or open the Makefile in this directory and define it there.
or try write a script to achieve the above
--------------------------------HELP---------------------------
endef
local_sources = frsky_dataApp.cpp frsky_dataMain.cpp frsky_event.cpp frsky_serial_port.cpp \
sp_thread.cpp tensor_data.cpp tensor_proto.cpp
INCLUDES = -I$(QUAN_INCLUDE_PATH)
local_objects = $(patsubst %.cpp,%.o,$(local_sources))
objects = $(local_objects) serial_port.o
CC = g++
LD = g++
CFLAGS = -Wall -std=c++11
LFLAGS =
fun_check_includes = $(if $(QUAN_INCLUDE_PATH),,$(error $(quan_path_not_defined_help_string)))
.PHONY : clean all
all : check_includes frsky_data.exe
check_includes:
@:$(call fun_check_includes)
$(local_objects) : %.o : %.cpp
$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@ `wx-config --cppflags`
serial_port.o : $(QUAN_INCLUDE_PATH)/quan_matters/src/serial_port.cpp
$(CC) -c $(CFLAGS) $(INCLUDES) $< -o $@ `wx-config --cppflags`
frsky_data.exe : $(objects)
$(LD) $(CFLAGS) $(LFLAGS) -o frsky_data.exe $(objects) `wx-config --libs`
clean:
-rm -rf *.o *.exe