Modify Makefiles

This commit is contained in:
xj 2024-06-05 03:21:09 -07:00
parent 3746135317
commit d4fde5c2fb
6 changed files with 35 additions and 31 deletions

View File

@ -1,4 +1,4 @@
SRC_DIR := $(BOARD) rk-3568 SRC_DIR := $(BOARD) usb
include $(KERNEL_ROOT)/compiler.mk include $(KERNEL_ROOT)/compiler.mk

View File

@ -1,3 +1,3 @@
SRC_DIR := components libusb SRC_DIR := components
include $(KERNEL_ROOT)/compiler.mk include $(KERNEL_ROOT)/compiler.mk

View File

@ -1,33 +1,17 @@
include $(KERNEL_ROOT)/services/drivers/usb/components/usb.mk
# usb_core = usbh_core.o
usb_class = usbh_hub.o \ # libserial = $(KERNEL_ROOT)/services/app/libserial.o
usbh_rndis.o \ # printf = $(KERNEL_ROOT)/services/app/printf.o
rndis_host.o # libmem = $(KERNEL_ROOT)/services/app/libmem.o
# usyscall = $(KERNEL_ROOT)/services/app/usyscall.o
# arch_usyscall = $(KERNEL_ROOT)/services/app/arch_usyscall.o
# session = $(KERNEL_ROOT)/services/app/session.o
# libipc = $(KERNEL_ROOT)/services/app/libipc.o
# libsem = $(KERNEL_ROOT)/services/app/libsemaphore.o
usb_common = usb_common.o SRC_DIR := core
usb_core = usbh_core.o
usb_osal = usb_osal.o
usb_port = usb_hc_xhci.o
libserial = $(KERNEL_ROOT)/services/app/libserial.o
printf = $(KERNEL_ROOT)/services/app/printf.o
libmem = $(KERNEL_ROOT)/services/app/libmem.o
usyscall = $(KERNEL_ROOT)/services/app/usyscall.o
arch_usyscall = $(KERNEL_ROOT)/services/app/arch_usyscall.o
session = $(KERNEL_ROOT)/services/app/session.o
libipc = $(KERNEL_ROOT)/services/app/libipc.o
libsem = $(KERNEL_ROOT)/services/app/libsemaphore.o
SRC_DIR += common
SRC_DIR += class class/cdc class/hub class/wireless
SRC_DIR += core
SRC_DIR += osal
SRC_DIR += port port/xhci
include $(KERNEL_ROOT)/compiler.mk

View File

@ -0,0 +1,11 @@
include $(KERNEL_ROOT)/services/drivers/usb/components/usb.mk
objs = usbh_core.o
all: ${objs}
@echo "generate $^"
@mv $^ $(KERNEL_ROOT)/services/drivers/usb/components
%.o: %.c
@echo "cc $^"
@${cc} ${cflags} ${c_useropts} ${INC_DIR} -o $@ -c $^

View File

@ -1 +1,7 @@
#include "usbh_core.h" #include "usbh_core.h"
// #include "libserial.h"
int main(){
// printf("++++++++++++++++++");
return 0;
}

View File

@ -13,7 +13,7 @@ cc = ${toolchain}gcc
ld = ${toolchain}g++ ld = ${toolchain}g++
objdump = ${toolchain}objdump objdump = ${toolchain}objdump
c_useropts = -O2 c_useropts = -O0
INC_DIR = -I$(KERNEL_ROOT)/services/drivers/usb/components \ INC_DIR = -I$(KERNEL_ROOT)/services/drivers/usb/components \
@ -33,3 +33,6 @@ INC_DIR = -I$(KERNEL_ROOT)/services/drivers/usb/components \
-I$(KERNEL_ROOT)/services/lib/usyscall \ -I$(KERNEL_ROOT)/services/lib/usyscall \
-I$(KERNEL_ROOT)/services/boards/$(BOARD) \ -I$(KERNEL_ROOT)/services/boards/$(BOARD) \
-I$(KERNEL_ROOT)/services/app -I$(KERNEL_ROOT)/services/app
# include $(KERNEL_ROOT)/compiler.mk