Build: Country submodule now has production target
When country was converted to a submodule (by me) the production installation target was hacked onto the kernel subdirectory Makefile which wasn't ideal. Introduce a production target into the country Makefile that does the installation. Since we want the submodule to be buildable standalone, we can't include the variable definitions from the upper level, such as $(DIRSEP) and $(CP), so the caller has to pass those in at build time if using the production target. Tested on Linux (GCC + Watcom) and DOS (Watcom)
This commit is contained in:
parent
3c97674cbf
commit
6092afc74d
@ -118,6 +118,13 @@ cd ..\kernel
|
||||
%MAKE% production
|
||||
if errorlevel 1 goto abort-cd
|
||||
|
||||
echo.
|
||||
echo Process COUNTRY +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
echo.
|
||||
cd ..\country
|
||||
%MAKE% DIRSEP=\ CP=copy production
|
||||
if errorlevel 1 goto abort-cd
|
||||
|
||||
echo.
|
||||
echo Process SETVER +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
echo.
|
||||
|
@ -27,7 +27,7 @@ OBJS=$(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) $(OBJS6) $(OBJS7) $(OBJS8)
|
||||
|
||||
# *Explicit Rules*
|
||||
|
||||
production: ../bin/$(TARGET).sys ../bin/country.sys
|
||||
production: ../bin/$(TARGET).sys
|
||||
|
||||
../bin/$(TARGET).sys: kernel.sys
|
||||
$(CP) kernel.sys ..$(DIRSEP)bin
|
||||
@ -42,12 +42,6 @@ kernel.sys: kernel.exe ../utils/exeflat.exe ../utils/upxentry.bin ../utils/upxde
|
||||
kernel.exe: $(TARGET).lnk $(OBJS) $(LIBS)
|
||||
$(LINK) @$(TARGET).lnk;
|
||||
|
||||
../bin/country.sys:
|
||||
# warning, both cd and -C options required, cd for wmake, -C for gmake
|
||||
cd ..$(DIRSEP)country
|
||||
$(MAKE) -C ..$(DIRSEP)country all
|
||||
$(CP) ..$(DIRSEP)country$(DIRSEP)country.sys ..$(DIRSEP)bin$(DIRSEP)country.sys
|
||||
|
||||
clobber: clean
|
||||
-$(RM) kernel.exe kernel.sys status.me
|
||||
|
||||
|
7
makefile
7
makefile
@ -67,8 +67,12 @@ export
|
||||
|
||||
ifeq ($(OS),Windows_NT)
|
||||
BUILDENV ?= windows
|
||||
DIRSEP=\
|
||||
CP=copy
|
||||
else
|
||||
BUILDENV ?= linux
|
||||
DIRSEP=/
|
||||
CP=cp
|
||||
endif
|
||||
|
||||
ifeq ($(BUILDENV),windows)
|
||||
@ -115,6 +119,7 @@ all:
|
||||
cd boot && $(MAKE) production
|
||||
cd sys && $(MAKE) production
|
||||
cd kernel && $(MAKE) production
|
||||
cd country && $(MAKE) DIRSEP=$(DIRSEP) CP=$(CP) production
|
||||
cd setver && $(MAKE) production
|
||||
$(MAKEREMOVE)
|
||||
|
||||
@ -126,6 +131,7 @@ clean:
|
||||
cd boot && $(MAKE) clean
|
||||
cd sys && $(MAKE) clean
|
||||
cd kernel && $(MAKE) clean
|
||||
cd country && $(MAKE) clean
|
||||
cd setver && $(MAKE) clean
|
||||
$(MAKEREMOVE)
|
||||
|
||||
@ -137,5 +143,6 @@ clobber:
|
||||
cd boot && $(MAKE) clobber
|
||||
cd sys && $(MAKE) clobber
|
||||
cd kernel && $(MAKE) clobber
|
||||
cd country && $(MAKE) clobber
|
||||
cd setver && $(MAKE) clobber
|
||||
$(MAKEREMOVE)
|
||||
|
Loading…
Reference in New Issue
Block a user