X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Makefile;h=8409f6ec34f0f61de87260dfa6359c24e168b9aa;hb=b770132cdb8e79f27f3d429f24d94284dd6fe970;hp=f67dd3cd1f5ac23ef1abfb6f224034392a3c5d7b;hpb=901bf4bada7bbba17bc8f1dcf36334a5b615e62f;p=tpg%2Facess2.git diff --git a/Makefile b/Makefile index f67dd3cd..8409f6ec 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,18 @@ -include Makefile.cfg -.PHONY: all clean +.PHONY: all clean SyscallList all-user SUBMAKE = $(MAKE) --no-print-directory -USRLIBS := crt0.o acess.ld ld-acess.so libgcc.so libc.so -USRLIBS += libreadline.so libnet.so liburi.so +USRLIBS := crt0.o acess.ld ld-acess.so libc.so libposix.so +USRLIBS += libreadline.so libnet.so liburi.so libpsocket.so +USRLIBS += libimage_sif.so libunicode.so USRAPPS := init login CLIShell cat ls mount -USRAPPS += bomb pcidump -USRAPPS += ifconfig ping irc +USRAPPS += bomb lspci +USRAPPS += ip dhcpclient ping telnet irc wget telnetd +USRAPPS += axwin3 gui_ate gui_shell ALL_DYNMODS = $(addprefix all-,$(DYNMODS)) ALL_MODULES := $(addprefix all-,$(MODULES)) @@ -35,62 +37,94 @@ AI_USRLIBS := $(addprefix allinstall-,$(USRLIBS)) AI_USRAPPS := $(addprefix allinstall-,$(USRAPPS)) .PHONY: all clean install \ + kmode all-kmode clean-kmode \ + all-user clean-user \ + utest mtest \ $(ALL_MODULES) all-Kernel $(ALL_USRLIBS) $(ALL_USRAPPS) \ $(AI_MODULES) allinstall-Kernel $(AI_USRLIBS) $(AI_USRAPPS) \ $(CLEAN_MODULES) clean-Kernel $(CLEAN_USRLIBS) $(CLEAN_USRAPPS) \ $(INSTALL_MODULES) install-Kernel $(INSTALL_USRLIBS) $(INSTALL_USRAPPS) kmode: $(AI_MODULES) $(AI_DYNMODS) allinstall-Kernel +all-kmode: $(ALL_MODULES) $(ALL_DYNMODS) all-Kernel +clean-kmode: $(CLEAN_MODULES) $(CLEAN_DYNMODS) clean-Kernel -all: $(ALL_DYNMODS) $(ALL_MODULES) all-Kernel $(ALL_USRLIBS) $(ALL_USRAPPS) -all-install: $(AI_DYNMODS) $(AI_MODULES) allinstall-Kernel $(AI_USRLIBS) $(AI_USRAPPS) +all-user: $(ALL_USRLIBS) $(ALL_USRAPPS) +clean-user: $(CLEAN_USRLIBS) $(CLEAN_USRAPPS) + +all: SyscallList $(ALL_USRLIBS) $(ALL_USRAPPS) $(ALL_MODULES) all-Kernel $(ALL_DYNMODS) +all-install: install-Filesystem SyscallList $(AI_USRLIBS) $(AI_USRAPPS) $(AI_MODULES) allinstall-Kernel $(AI_DYNMODS) clean: $(CLEAN_DYNMODS) $(CLEAN_MODULES) clean-Kernel $(CLEAN_USRLIBS) $(CLEAN_USRAPPS) -install: $(INSTALL_DYNMODS) $(INSTALL_MODULES) install-Kernel $(INSTALL_USRLIBS) $(INSTALL_USRAPPS) +install: install-Filesystem SyscallList $(INSTALL_USRLIBS) $(INSTALL_USRAPPS) $(INSTALL_DYNMODS) $(INSTALL_MODULES) install-Kernel + +utest: $(USRLIBS:%=utest-%) + +$(USRLIBS:%=utest-%): utest-%: + @$(SUBMAKE) -C Usermode/Libraries/$*_src generate_exp + @$(SUBMAKE) -C Usermode/Libraries/$*_src utest -k + +mtest: + ; + +SyscallList: include/syscalls.h +include/syscalls.h: KernelLand/Kernel/Makefile KernelLand/Kernel/syscalls.lst + @make -C KernelLand/Kernel/ include/syscalls.h + +_build_dynmod := BUILDTYPE=dynamic $(SUBMAKE) -C KernelLand/Modules/ +_build_stmod := BUILDTYPE=static $(SUBMAKE) -C KernelLand/Modules/ +_build_kernel := $(SUBMAKE) -C KernelLand/Kernel # Compile Only $(ALL_DYNMODS): all-%: - @echo === Dynamic Module: $* && BUILDTYPE=dynamic $(SUBMAKE) all -C Modules/$* + +@echo === Dynamic Module: $* && $(_build_dynmod)$* all $(ALL_MODULES): all-%: - @echo === Module: $* && BUILDTYPE=static $(SUBMAKE) all -C Modules/$* + +@echo === Module: $* && $(_build_stmod)$* all all-Kernel: - @echo === Kernel && $(SUBMAKE) all -C Kernel + +@echo === Kernel && $(_build_kernel) all $(ALL_USRLIBS): all-%: - @echo === User Library: $* && $(SUBMAKE) all -C Usermode/Libraries/$*_src + +@echo === User Library: $* && $(SUBMAKE) all -C Usermode/Libraries/$*_src $(ALL_USRAPPS): all-%: - @echo === User Application: $* && $(SUBMAKE) all -C Usermode/Applications/$*_src + +@echo === User Application: $* && $(SUBMAKE) all -C Usermode/Applications/$*_src # Compile & Install $(AI_DYNMODS): allinstall-%: - @echo === Dynamic Module: $* && BUILDTYPE=dynamic $(SUBMAKE) all install -C Modules/$* + +@echo === Dynamic Module: $* && $(_build_dynmod)$* all install $(AI_MODULES): allinstall-%: - @echo === Module: $* && BUILDTYPE=static $(SUBMAKE) all install -C Modules/$* + +@echo === Module: $* && $(_build_stmod)$* all install allinstall-Kernel: - @echo === Kernel && $(SUBMAKE) all install -C Kernel + +@echo === Kernel && $(_build_kernel) all install $(AI_USRLIBS): allinstall-%: - @echo === User Library: $* && $(SUBMAKE) all install -C Usermode/Libraries/$*_src + +@echo === User Library: $* && $(SUBMAKE) all install -C Usermode/Libraries/$*_src $(AI_USRAPPS): allinstall-%: - @echo === User Application: $* && $(SUBMAKE) all install -C Usermode/Applications/$*_src + +@echo === User Application: $* && $(SUBMAKE) all install -C Usermode/Applications/$*_src # Clean up compilation $(CLEAN_DYNMODS): clean-%: - @BUILDTYPE=dynamic $(SUBMAKE) clean -C Modules/$* + +@$(_build_dynmod)$* clean $(CLEAN_MODULES): clean-%: - @BUILDTYPE=static $(SUBMAKE) clean -C Modules/$* + +@$(_build_stmod)$* clean clean-Kernel: - @$(SUBMAKE) clean -C Kernel + +@$(_build_kernel) clean $(CLEAN_USRLIBS): clean-%: - @$(SUBMAKE) clean -C Usermode/Libraries/$*_src + +@$(SUBMAKE) clean -C Usermode/Libraries/$*_src $(CLEAN_USRAPPS): clean-%: - @$(SUBMAKE) clean -C Usermode/Applications/$*_src + +@$(SUBMAKE) clean -C Usermode/Applications/$*_src # Install +ifeq ($(ARCH),host) +install-%: + +else $(INSTALL_DYNMODS): install-%: - @BUILDTYPE=dynamic $(SUBMAKE) install -C Modules/$* + @$(_build_dynmod)$* install $(INSTALL_MODULES): install-%: - @BUILDTYPE=static $(SUBMAKE) install -C Modules/$* + @$(_build_stmod)$* install +install-Filesystem: + @$(SUBMAKE) install -C Usermode/Filesystem install-Kernel: - @$(SUBMAKE) install -C Kernel + @$(_build_kernel) install $(INSTALL_USRLIBS): install-%: @$(SUBMAKE) install -C Usermode/Libraries/$*_src $(INSTALL_USRAPPS): install-%: @$(SUBMAKE) install -C Usermode/Applications/$*_src +endif