-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
57 lines (43 loc) · 1.93 KB
/
Makefile
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
OSDIR = .
include common.mk
OBJS = boot.o startup.o uart.o ports.o mmu.o system.o display.o interrupts.o \
usb.o fs.o audio_i2s.o exceptions.o cache.o display_filter.o \
dma.o rtc.o smp.o spinlock.o ubsan.o tve.o
USB_OBJS = tinyusb/src/host/ohci/ohci1.o tinyusb/src/host/ohci/ohci2.o tinyusb/src/host/ohci/ohci3.o\
tinyusb/src/host/usbh1.o tinyusb/src/host/usbh2.o tinyusb/src/host/usbh3.o \
tinyusb/src/host/hub1.o tinyusb/src/host/hub2.o tinyusb/src/host/hub3.o \
tinyusb/src/class/hid/hid_host1.o tinyusb/src/class/hid/hid_host2.o tinyusb/src/class/hid/hid_host3.o \
tinyusb/src/common/tusb_fifo.o \
tinyusb/src/tusb1.o tinyusb/src/tusb2.o tinyusb/src/tusb3.o \
tinyusb/src/class/msc/msc_host1.o tinyusb/src/class/msc/msc_host2.o tinyusb/src/class/msc/msc_host3.o \
tinyusb/lib/fatfs/diskio1.o tinyusb/lib/fatfs/diskio2.o tinyusb/lib/fatfs/diskio3.o
ifneq ($(GDB),)
GDB_OBJS = gdb/tzvecs.o gdb/gdbstub.o gdb/string.o gdb/printk.o
endif
LIBC_CSRC = libc_io.c
LIBC_OBJS = $(LIBC_CSRC:.c=.o)
ifneq ($(LIBH3_MMC),)
SD_OBJS = lib-h3/lib-hal/src/h3/sdcard/diskio.o
else
SD_OBJS = fatfs/mmc_sunxi.o
endif
SD_OBJS += fatfs/ff.o fatfs/ffunicode.o
LWIPDIR = $(OSDIR)/lwip/src
-include $(LWIPDIR)/Filelists.mk
NET_CSRC = network.c $(COREFILES) $(CORE4FILES) $(NETIFFILES) $(HTTPFILES) $(TFTPFILES) $(LWIPDIR)/api/err.c
NET_OBJS = $(NET_CSRC:.c=.o)
ALL_OBJS = $(OBJS) $(GDB_OBJS) $(USB_OBJS) $(LIBC_OBJS) $(SD_OBJS) $(NET_OBJS)
OUT_ALL_OBJS = $(addprefix $(OBJDIR)/, $(ALL_OBJS))
all: libos.a libh3 libarm
libos.a: $(OUT_ALL_OBJS) Makefile
rm -f $@
$(AR) rc $@ $(OUT_ALL_OBJS)
libh3:
$(MAKE) -C $(LIBH3DIR)/lib-h3 -f Makefile.H3 PREFIX=$(PREFIX) PLATFORM=ORANGE_PI_ONE
libarm:
$(MAKE) -C $(LIBH3DIR)/lib-arm -f Makefile.H3 PREFIX=$(PREFIX) PLATFORM=ORANGE_PI_ONE
clean:
rm -fr build libos.a
$(MAKE) -C $(LIBH3DIR)/lib-h3 -f Makefile.H3 clean
$(MAKE) -C $(LIBH3DIR)/lib-arm -f Makefile.H3 clean
-include $(OUT_ALL_OBJS:%.o=%.d)