forked from Manuvr/Digitabulum-Firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.esp32
140 lines (131 loc) · 4.35 KB
/
Makefile.esp32
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
###########################################################################
# Makefile for Digitabulum on the ESP32.
# Author: J. Ian Lindsay
# Date: 2017.02.08
#
###########################################################################
PROJECT_NAME := digitabulum-r2
BUILD_ROOT := $(shell pwd)
BUILD_DIR_BASE := $(BUILD_ROOT)/build
#EXTRA_COMPONENT_DIRS := $(BUILD_ROOT)/lib/
SRCDIRS := $(BUILD_ROOT)/src/
############################################################################
## Environmental awareness...
############################################################################
ifndef IDF_PATH
$(error If building for ESP32, you must supply the IDF_PATH variable.)
endif
include $(IDF_PATH)/make/project.mk
#OPTIMIZATION = -O2
#C_STANDARD = gnu99
#CPP_STANDARD = gnu++11
#
#
#
## NOTE: Assumption...
#export TOOLCHAIN_PATH = $(IDF_PATH)/xtensa-esp32-elf
#
#export CC = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-gcc
#export CXX = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-g++
#export AR = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-ar
#export SZ = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-size
#export LD = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-ld
#export AS = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-as
#export CP = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-objcopy
#export OD = $(TOOLCHAIN_PATH)/bin/xtensa-esp32-elf-objdump
#export MAKE = $(shell which make)
#
#
#
############################################################################
## Includes, flags, and linker directives...
############################################################################
#CPP_FLAGS = -fno-rtti -fno-exceptions
#CFLAGS = -Wall
#LIBS = -lc -lm -lpthread -lfreertos -llwip -lmanuvr
#
#INCLUDES = -iquote. -iquotesrc/
#INCLUDES += -I$(IDF_PATH)/components/
#INCLUDES += -I$(IDF_PATH)/components/freertos/include/freertos/
#INCLUDES += -I$(BUILD_ROOT)/lib/ManuvrOS/ManuvrOS
#INCLUDES += -I$(BUILD_ROOT)/lib
#INCLUDES += -I$(BUILD_ROOT)/confs
#INCLUDES += -I$(BUILD_ROOT)/src/Digitabulum
#
## Flags for the linker...
#LDFLAGS = -static
#LDFLAGS += $(LIBPATHS)
#LDFLAGS += -Wl,--start-group $(LIBS) -Wl,--end-group
#LDFLAGS += -Wl,--gc-sections -Wall
#LDFLAGS += -Wl,-Map=$(FIRMWARE_NAME).map
#LDFLAGS += -L. -L$(OUTPUT_PATH)
#
############################################################################
## Source file definitions...
############################################################################
#SOURCES_CPP = src/main-wroom32.cpp
#SOURCES_CPP += src/Digitabulum/CPLDDriver/CPLDDriver.cpp
#SOURCES_CPP += src/Digitabulum/LSM9DS1/LSM9DS1.cpp
#SOURCES_CPP += src/Digitabulum/LSM9DS1/RegPtrMap.cpp
#SOURCES_CPP += src/Digitabulum/ManuLegend/SensorFrame.cpp
#SOURCES_CPP += src/Digitabulum/ManuLegend/Integrator.cpp
#SOURCES_CPP += src/Digitabulum/ManuLegend/ManuManager.cpp
#SOURCES_CPP += src/Digitabulum/ManuLegend/ManuLegend.cpp
#
#
############################################################################
## Option conditionals
############################################################################
#MANUVR_OPTIONS += -D__MANUVR_FREERTOS
#MANUVR_OPTIONS += -D__MANUVR_ESP32
#
#
## Debugging options...
##CFLAGS += -g -ggdb
##CPP_FLAGS += -fno-use-linker-plugin
##CPP_FLAGS += -fstack-usage
#endif
#
#
############################################################################
## exports, consolidation....
############################################################################
#OBJS = $(SOURCES_C:.c=.o)
#
## Merge our choices and export them to the downstream Makefiles...
#CFLAGS += $(MANUVR_OPTIONS) $(OPTIMIZATION) $(INCLUDES)
#
#export MANUVR_PLATFORM = ESP32
#export CFLAGS
#export CPP_FLAGS += $(CFLAGS)
#
#
############################################################################
## Rules for building the firmware follow...
############################################################################
#vpath %.a $(OUTPUT_PATH)
#
#
#.PHONY: all
#
#all: $(OUTPUT_PATH)/$(FIRMWARE_NAME)
# $(SZ) $(OUTPUT_PATH)/$(FIRMWARE_NAME)
#
#%.o : %.c
# $(CC) $(CFLAGS) -c -o $@ $^
#
#libs:
# mkdir -p $(OUTPUT_PATH)
# $(MAKE) manuvr -C lib
#
#$(OUTPUT_PATH)/$(FIRMWARE_NAME): $(OBJS) libs
# $(CXX) $(OBJS) $(SOURCES_CPP) -o $@ $(CPP_FLAGS) -std=$(CPP_STANDARD) $(LDFLAGS)
#
#clean:
# rm -f *.o *.su *~ *.map $(OBJS)
#
#fullclean: clean
# rm -rf doc/doxygen/*
# rm -rf $(OUTPUT_PATH)
# $(MAKE) clean -C lib
#