Skip to content

Commit

Permalink
include-path: correct compiler include path list
Browse files Browse the repository at this point in the history
remove duplicit hdr path
now CLT and CLC macros hold necessary include path list for DOS or host OS (cross-compile)
  • Loading branch information
jmalak committed Jul 16, 2024
1 parent db43a4b commit badb66c
Show file tree
Hide file tree
Showing 13 changed files with 18 additions and 25 deletions.
2 changes: 1 addition & 1 deletion mkfiles/bc3.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COMPILERPATH=$(BC3_BASE)
COMPILERBIN=$(COMPILERPATH)\bin
CC=$(COMPILERBIN)\bcc -c
CL=$(COMPILERBIN)\bcc
INCLUDEPATH=$(COMPILERPATH)\include
INCLUDEPATH=-I$(COMPILERPATH)\include
LIBUTIL=$(COMPILERBIN)\tlib
LIBPATH=$(COMPILERPATH)\lib
LIBTERM=
Expand Down
2 changes: 1 addition & 1 deletion mkfiles/bc5.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COMPILERPATH=$(BC5_BASE)
COMPILERBIN=$(COMPILERPATH)\bin
CC=$(COMPILERBIN)\bcc -c
CL=$(COMPILERBIN)\bcc
INCLUDEPATH=$(COMPILERPATH)\include
INCLUDEPATH=-I$(COMPILERPATH)\include
LIBUTIL=$(COMPILERBIN)\tlib
LIBPATH=$(COMPILERPATH)\lib
LIBTERM=
Expand Down
1 change: 0 additions & 1 deletion mkfiles/gcc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ NASMFLAGS+=-i../hdr/ -DXCPU=$(XCPU) -felf

CC=ia16-elf-gcc -c
CL=ia16-elf-gcc
INCLUDEPATH=.

LIBUTIL=ar crs
LIBPLUS=
Expand Down
4 changes: 2 additions & 2 deletions mkfiles/generic.mak
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ LOADSEG=0x60
!include "../mkfiles/$(COMPILER).mak"

!if $(CLDEF) == 0
CLT=$(CL) $(CFLAGST) $(TINY) -I$(INCLUDEPATH)
CLC=$(CL) $(CFLAGSC) -I$(INCLUDEPATH)
CLT=$(CL) $(CFLAGST) $(TINY) -I..\hdr $(INCLUDEPATH)
CLC=$(CL) $(CFLAGSC) -I..\hdr $(INCLUDEPATH)
!endif

TARGET=$(TARGET)$(XCPU)$(XFAT)
Expand Down
7 changes: 2 additions & 5 deletions mkfiles/mscl8.mak
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,17 @@
# Use these for MSCV 1.52
COMPILERPATH=$(MS_BASE)
COMPILERBIN=$(COMPILERPATH)\bin
INCLUDEPATH=$(COMPILERPATH)\include
INCLUDEPATH=-I$(COMPILERPATH)\include
CC=$(COMPILERBIN)\cl -c
CL=$(COMPILERBIN)\cl
TINY=
CFLAGST=/Fm /AT /Os /Zp1
CFLAGSC=/Fm /AL /Os /Zp1
LIBPATH=$(COMPILERPATH)\lib
LIB=$(COMPILERPATH)\lib
INCLUDE=$(COMPILERPATH)\include
LIB=$(LIBPATH)
LIBUTIL=$(COMPILERBIN)\lib /nologo
LIBPLUS=+
LIBTERM=;
INCLUDE=$(COMPILERPATH)\include
LIB=$(COMPILERPATH)\lib

# used for building the library

Expand Down
5 changes: 3 additions & 2 deletions mkfiles/owlinux.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ include "../mkfiles/watcom.mak"
DIRSEP=/
CC=$(CC) -fo=.obj
CL=$(CL) -fo=.obj
INCLUDEPATH=$(COMPILERPATH)/h
INCLUDEPATH=-I$(COMPILERPATH)/h
EDPATH=$(COMPILERPATH)/eddat
RM=rm -f
CP=cp
ECHOTO=echo>>
INITPATCH=@echo > /dev/null
CLDEF=1
CLT=wcl386 -zq -fo=.obj -bcl=linux -I../hdr -fe=$@ -I$(COMPILERPATH)/lh
CLT=wcl386 -zq -fo=.obj -bcl=linux -fe=$@ -I../hdr -I$(COMPILERPATH)/lh
CLC=$(CLT)
XLINK=$(XLINK) debug all format dos opt quiet,symfile,map,statics,verbose F { $(OBJS) } L ../lib/device.lib N kernel.exe $#
3 changes: 1 addition & 2 deletions mkfiles/owwin.mak
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,12 @@ include "../mkfiles/watcom.mak"

DIRSEP=\

INCLUDEPATH=$(COMPILERPATH)\h
#RM=del 2>nul
#CP=copy
#ECHOTO=echo>>
#INITPATCH=@echo > nul
CLDEF=1
CLT=wcl386 -zq -bcl=nt -I..\hdr -fe=$@ -I$(COMPILERPATH)\h -I$(COMPILERPATH)\h\nt
CLT=wcl386 -zq -bcl=nt -fe=$@ -I..\hdr -I$(COMPILERPATH)\h -I$(COMPILERPATH)\h\nt
CLC=$(CLT)
NASMFLAGS=-DWATCOM $(NASMFLAGS)
XLINK=$(XLINK) debug all format dos opt quiet,symfile,map,statics,verbose F { $(OBJS) } L ..$(DIRSEP)lib$(DIRSEP)device.lib N kernel.exe $#
2 changes: 1 addition & 1 deletion mkfiles/tc2.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COMPILERPATH=$(TC2_BASE)
COMPILERBIN=$(COMPILERPATH)
CC=$(COMPILERBIN)\tcc -c
CL=$(COMPILERBIN)\tcc
INCLUDEPATH=$(COMPILERPATH)\include
INCLUDEPATH=-I$(COMPILERPATH)\include
LIBUTIL=$(COMPILERBIN)\tlib
LIBPATH=$(COMPILERPATH)\lib
LIBTERM=
Expand Down
2 changes: 1 addition & 1 deletion mkfiles/tc3.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COMPILERPATH=$(TC3_BASE)
COMPILERBIN=$(COMPILERPATH)\bin
CC=$(COMPILERBIN)\tcc -c
CL=$(COMPILERBIN)\tcc
INCLUDEPATH=$(COMPILERPATH)\include
INCLUDEPATH=-I$(COMPILERPATH)\include
LIBUTIL=$(COMPILERBIN)\tlib
LIBPATH=$(COMPILERPATH)\lib
LIBTERM=
Expand Down
2 changes: 1 addition & 1 deletion mkfiles/turbocpp.mak
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ COMPILERPATH=$(TP1_BASE)
COMPILERBIN=$(COMPILERPATH)\bin
CC=$(COMPILERBIN)\tcc -c
CL=$(COMPILERBIN)\tcc
INCLUDEPATH=$(COMPILERPATH)\include
INCLUDEPATH=-I$(COMPILERPATH)\include
LIBUTIL=$(COMPILERBIN)\tlib
LIBPATH=$(COMPILERPATH)\lib
LIBTERM=
Expand Down
5 changes: 2 additions & 3 deletions mkfiles/watcom.mak
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
COMPILERPATH=$(WATCOM)
CC=*wcc -zq
CL=wcl -zq
INCLUDEPATH=$(COMPILERPATH)\H
INCLUDE=$(COMPILERPATH)\h
EDPATH=$(COMPILERPATH)\EDDAT
INCLUDEPATH=-I$(COMPILERPATH)\h
EDPATH=$(COMPILERPATH)\eddat

!if $(XCPU) != 186
!if $(XCPU) != 386
Expand Down
2 changes: 1 addition & 1 deletion sys/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

!include "../mkfiles/generic.mak"

CFLAGS = -I$(INCLUDEPATH) -I..$(DIRSEP)hdr -DFORSYS -DWITHFAT32 $(CFLAGST)
CFLAGS = -DFORSYS -DWITHFAT32 $(CFLAGST) -I. -I..$(DIRSEP)hdr $(INCLUDEPATH)
NASMFLAGS = -DSYS=1

# *List Macros*
Expand Down
6 changes: 2 additions & 4 deletions utils/makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
!include "../mkfiles/generic.mak"

CFLAGS = -I..$(DIRSEP)hdr

production: patchobj.com exeflat.exe upxentry.bin upxdevic.bin

patchobj.com: patchobj.c
$(CLT) $(CFLAGS) patchobj.c
$(CLT) patchobj.c

upxentry.bin: upxentry.asm
$(NASM) -f bin upxentry.asm -o upxentry.bin
Expand All @@ -14,7 +12,7 @@ upxdevic.bin: upxdevic.asm
$(NASM) -f bin upxdevic.asm -o upxdevic.bin

exeflat.exe: exeflat.c ../hdr/exe.h
$(CLC) $(CFLAGS) exeflat.c
$(CLC) exeflat.c


clobber: clean
Expand Down

0 comments on commit badb66c

Please sign in to comment.