Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on FreeDOS and OpenWATCOM environment #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 31 additions & 2 deletions kernel/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,21 @@ clean:

# XXX: This is a very ugly way of linking the kernel, forced upon us by the
# inability of Turbo `make' 2.0 to perform command line redirection. -- ror4

ifeq ($(%OS_NAME),FreeDOS)
ifeq ($(%COMPILER),WATCOM)
$(TARGET).lnk: turboc.cfg makefile ../mkfiles/generic.mak ../mkfiles/$(COMPILER).mak
-$(RM) *.lnk
$(ECHOTO) $(TARGET).lnk F {
$(ECHOTO) $(TARGET).lnk $(OBJS1)
$(ECHOTO) $(TARGET).lnk $(OBJS2)
$(ECHOTO) $(TARGET).lnk $(OBJS3)
$(ECHOTO) $(TARGET).lnk $(OBJS4)
$(ECHOTO) $(TARGET).lnk $(OBJS5)
$(ECHOTO) $(TARGET).lnk $(OBJS6)
$(ECHOTO) $(TARGET).lnk $(OBJS7)
$(ECHOTO) $(TARGET).lnk $(OBJS8)
$(ECHOTO) $(TARGET).lnk } L ..\lib\device.lib L ..\lib\libm.lib N kernel.exe
else
$(TARGET).lnk: turboc.cfg makefile ../mkfiles/generic.mak ../mkfiles/$(COMPILER).mak
-$(RM) *.lnk
$(ECHOTO) $(TARGET).lnk $(OBJS1)+
Expand All @@ -67,7 +81,22 @@ $(TARGET).lnk: turboc.cfg makefile ../mkfiles/generic.mak ../mkfiles/$(COMPILER)
$(ECHOTO) $(TARGET).lnk kernel.exe
$(ECHOTO) $(TARGET).lnk kernel.map
$(ECHOTO) $(TARGET).lnk $(LIBS)

endif
else
$(TARGET).lnk: turboc.cfg makefile ../mkfiles/generic.mak ../mkfiles/$(COMPILER).mak
-$(RM) *.lnk
$(ECHOTO) $(TARGET).lnk $(OBJS1)+
$(ECHOTO) $(TARGET).lnk $(OBJS2)+
$(ECHOTO) $(TARGET).lnk $(OBJS3)+
$(ECHOTO) $(TARGET).lnk $(OBJS4)+
$(ECHOTO) $(TARGET).lnk $(OBJS5)+
$(ECHOTO) $(TARGET).lnk $(OBJS6)+
$(ECHOTO) $(TARGET).lnk $(OBJS7)+
$(ECHOTO) $(TARGET).lnk $(OBJS8)
$(ECHOTO) $(TARGET).lnk kernel.exe
$(ECHOTO) $(TARGET).lnk kernel.map
$(ECHOTO) $(TARGET).lnk $(LIBS)
endif
# *Individual File Dependencies*
apisupt.obj: apisupt.asm segs.inc $(TARGET).lnk
asmsupt.obj: asmsupt.asm segs.inc $(TARGET).lnk
Expand Down
4 changes: 2 additions & 2 deletions mkfiles/generic.mak
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ NASMFLAGS=$(NASMFLAGS) -DWITHFAT32
NASM=$(XNASM)
NASMFLAGS = $(NASMFLAGS) -i../hdr/ -DXCPU=$(XCPU)

LINK=$(XLINK)

INITPATCH=@rem
DIRSEP=\ #a backslash
RM=..\utils\rmfiles
Expand All @@ -39,6 +37,8 @@ LOADSEG=0x60

!include "../mkfiles/$(COMPILER).mak"

LINK=$(XLINK)

!if $(CLDEF) == 0
CLT=$(CL) $(CFLAGST) $(TINY) -I$(INCLUDEPATH)
CLC=$(CL) $(CFLAGSC) -I$(INCLUDEPATH)
Expand Down
5 changes: 5 additions & 0 deletions mkfiles/watcom.mak
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,8 @@ ALLCFLAGS=-I..$(DIRSEP)hdr $(TARGETOPT) $(ALLCFLAGS)-zq-os-s-e5-j-zl-zp1-wx-we-z
INITCFLAGS=$(ALLCFLAGS)-ntINIT_TEXT-gTGROUP-ndI
CFLAGS=$(ALLCFLAGS)-ntHMA_TEXT

!ifeq $(%OS_NAME) FreeDOS
!ifeq $(%COMPILER) WATCOM
XLINK=$(XLINK) debug all op symfile format dos option map,statics,verbose
!endif
!endif