summaryrefslogtreecommitdiff
path: root/Makefile.lib
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile.lib')
-rw-r--r--Makefile.lib20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile.lib b/Makefile.lib
new file mode 100644
index 0000000..ce5787c
--- /dev/null
+++ b/Makefile.lib
@@ -0,0 +1,20 @@
+MCU = IMXRT1062
+MCU_DEF = ARDUINO_TEENSY40
+
+OPTIONS = -DF_CPU=600000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH
+OPTIONS += -D__$(MCU)__ -DARDUINO=10813 -DTEENSYDUINO=154 -D$(MCU_DEF)
+
+CPU_OPTIONS = -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -mthumb
+
+CPPFLAGS = -Wall -g -O2 $(CPU_OPTIONS) -MMD $(OPTIONS) -I. -ffunction-sections -fdata-sections -I.
+CXXFLAGS = -std=gnu++14 -felide-constructors -fno-exceptions -fpermissive -fno-rtti -Wno-error=narrowing
+
+C_FILES := $(wildcard *.c)
+CPP_FILES := $(wildcard *.cpp)
+OBJS := $(C_FILES:.c=.o) $(CPP_FILES:.cpp=.o)
+
+C_FILES := $(wildcard *.c)
+CPP_FILES := $(wildcard *.cpp)
+OBJS := $(C_FILES:.c=.o) $(CPP_FILES:.cpp=.o)
+
+all: $(OBJS) \ No newline at end of file