-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
79 lines (61 loc) · 2.34 KB
/
Makefile
File metadata and controls
79 lines (61 loc) · 2.34 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
################################################################################
######################### User configurable parameters #########################
# filename extensions
CEXTS:=c
ASMEXTS:=s S
CXXEXTS:=cpp c++ cc
# probably shouldn't modify these, but you may need them below
ROOT=.
FWDIR:=$(ROOT)/firmware
SRCDIR=$(ROOT)/src
INCDIR=$(ROOT)/include
EXTRA_INCDIR=$(ROOT)/include/packages
WARNFLAGS+=
EXTRA_C_BOTH_FLAGS=-D_PROS_INCLUDE_LIBLVGL_LLEMU_H -D_PROS_INCLUDE_LIBLVGL_LLEMU_HPP
# EXTRA_C_BOTH_FLAGS+=-DENABLE_PROFILING
EXTRA_CXXFLAGS+=-Wno-deprecated-enum-enum-conversion
USE_PACKAGE:=1
ifndef SIM
$(info COMPILING FOR V5 BRAIN)
# Set to 1 to enable hot/cold linking
BINDIR=$(ROOT)/bin/bot
else
$(info COMPILING FOR SIM)
EXTRA_C_BOTH_FLAGS+=-DVEXIDE_SIMULATION
BINDIR=$(ROOT)/bin/sim
endif
# Maybe was the reason NaNs were appearing
# EXTRA_C_BOTH_FLAGS+=-Ofast -lto
ifdef PROF
EXTRA_C_BOTH_FLAGS+=-DENABLE_PROFILING
endif
ifndef TUNING
# enable pid tuning
EXTRA_C_BOTH_FLAGS+=-DTUNING
endif
EXTRA_CFLAGS+=$(EXTRA_C_BOTH_FLAGS)
EXTRA_CXXFLAGS+=$(EXTRA_C_BOTH_FLAGS)
# Add libraries you do not wish to include in the cold image here
# EXCLUDE_COLD_LIBRARIES:= $(FWDIR)/your_library.a
EXCLUDE_COLD_LIBRARIES:=
# Set this to 1 to add additional rules to compile your project as a PROS library template
IS_LIBRARY:=0
# TODO: CHANGE THIS!
# Be sure that your header files are in the include directory inside of a folder with the
# same name as what you set LIBNAME to below.
LIBNAME:=libbest
VERSION:=1.0.0
# EXCLUDE_SRC_FROM_LIB= $(SRCDIR)/unpublishedfile.c
# this line excludes opcontrol.c and similar files
EXCLUDE_SRC_FROM_LIB+=$(foreach file, $(SRCDIR)/main,$(foreach cext,$(CEXTS),$(file).$(cext)) $(foreach cxxext,$(CXXEXTS),$(file).$(cxxext)))
# files that get distributed to every user (beyond your source archive) - add
# whatever files you want here. This line is configured to add all header files
# that are in the directory include/LIBNAME
TEMPLATE_FILES=$(INCDIR)/$(LIBNAME)/*.h $(INCDIR)/$(LIBNAME)/*.hpp
.DEFAULT_GOAL=my-quick
my-quick: quick
$(shell cp $(BINDIR)/*.bin $(BINDIR)/..)
################################################################################
################################################################################
########## Nothing below this line should be edited by typical users ###########
-include ./common.mk