diff --git a/Makefile b/Makefile index 143ac167..fb95f5ed 100644 --- a/Makefile +++ b/Makefile @@ -443,14 +443,17 @@ C_D_FILES = $(C_FILES:%.c=%.d) LIB = libbsd.a -all: lib_usb +all: lib_bsd lib_user $(LIB): $(C_O_FILES) $(AR) rcu $@ $^ -lib_usb: +lib_bsd: $(MAKE) $(LIB) +lib_user: + $(MAKE) -C freebsd-userspace + CPU_SED = sed CPU_SED += -e '/arm/d' CPU_SED += -e '/i386/d' @@ -468,11 +471,13 @@ install: $(LIB) install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done cd freebsd/$(RTEMS_CPU)/include ; for i in `find . -name '*.h'` ; do \ install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done + $(MAKE) -C freebsd-userspace clean clean: rm -f -r $(PROJECT_INCLUDE)/rtems/freebsd rm -f $(LIB) $(C_O_FILES) $(C_D_FILES) rm -f libbsd.html + $(MAKE) -C freebsd-userspace clean -include $(C_D_FILES) diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py index 3df4a251..308b08c0 100755 --- a/freebsd-to-rtems.py +++ b/freebsd-to-rtems.py @@ -362,14 +362,17 @@ class ModuleManager: '\n' \ 'LIB = libbsd.a\n' \ '\n' \ - 'all: lib_usb\n' \ + 'all: lib_bsd lib_user\n' \ '\n' \ '$(LIB): $(C_O_FILES)\n' \ '\t$(AR) rcu $@ $^\n' \ '\n' \ - 'lib_usb:\n' \ + 'lib_bsd:\n' \ '\t$(MAKE) $(LIB)\n' \ '\n' \ + 'lib_user:\n' \ + '\t$(MAKE) -C freebsd-userspace\n' \ + '\n' \ 'CPU_SED = sed\n' \ 'CPU_SED += -e \'/arm/d\'\n' \ 'CPU_SED += -e \'/i386/d\'\n' \ @@ -387,11 +390,13 @@ class ModuleManager: '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \ '\tcd freebsd/$(RTEMS_CPU)/include ; for i in `find . -name \'*.h\'` ; do \\\n' \ '\t install -c -m 644 -D "$$i" "$(INSTALL_BASE)/include/$$i" ; done\n' \ + '\t$(MAKE) -C freebsd-userspace clean\n' \ '\n' \ 'clean:\n' \ '\trm -f -r $(PROJECT_INCLUDE)/rtems/freebsd\n' \ '\trm -f $(LIB) $(C_O_FILES) $(C_D_FILES)\n' \ '\trm -f libbsd.html\n' \ + '\t$(MAKE) -C freebsd-userspace clean\n' \ '\n' \ '-include $(C_D_FILES)\n' \ '\n' \