-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmakefile
More file actions
38 lines (27 loc) · 697 Bytes
/
makefile
File metadata and controls
38 lines (27 loc) · 697 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
ifeq (,$(TOOLCHAIN_PREFIX))
$(error TOOLCHAIN_PREFIX is not set)
endif
ifeq (,$(U8G2_PREFIX))
$(error U8G2_PREFIX is not set)
endif
ifeq (,$(CFLAGS))
$(error CFLAGS is not set)
endif
ifeq (,$(LDFLAGS))
$(error LDFLAGS is not set)
endif
CXXFLAGS+=-I${U8G2_PREFIX}/include -std=c++17
CFLAGS+= -I${U8G2_PREFIX}/include
LDFLAGS+= -L${U8G2_PREFIX}/lib -static
LDLIBS+=-l:libu8g2arm.a
CC = $(TOOLCHAIN_PREFIX)gcc
CXX = $(TOOLCHAIN_PREFIX)g++
default: disc-emu
%.o: %.cpp
$(CXX) $(CXXFLAGS) -o $@ -c $<
%.o: %.c
$(CC) $(CFLAGS) -o $@ -c $<
disc-emu: main.o menu.o input.o usb.o network.o
$(CXX) $(LDFLAGS) main.o menu.o input.o usb.o network.o $(LDLIBS) -o disc-emu
clean:
rm *.o disc-emu