2001-11-14 00:36:45 +01:00
|
|
|
# These are generic definitions
|
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
# TARGET : we create a $(TARGET).sys file
|
2001-11-04 22:43:35 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
!if $(XCPU)0 == 0
|
|
|
|
XCPU=86
|
|
|
|
!endif
|
|
|
|
CPUOPT=
|
2001-11-04 22:43:35 +01:00
|
|
|
!if $(XCPU) == 186
|
2004-07-09 04:16:31 +02:00
|
|
|
CPUOPT=-1
|
2001-11-04 22:43:35 +01:00
|
|
|
!endif
|
|
|
|
!if $(XCPU) == 386
|
2004-07-09 04:16:31 +02:00
|
|
|
CPUOPT=-3
|
2001-11-04 22:43:35 +01:00
|
|
|
!endif
|
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
!if $(XFAT)0 == 0
|
|
|
|
XFAT=32
|
|
|
|
!endif
|
2001-11-04 22:43:35 +01:00
|
|
|
!if $(XFAT) == 32
|
2004-07-09 04:16:31 +02:00
|
|
|
ALLCFLAGS=-DWITHFAT32 $(ALLCFLAGS)
|
|
|
|
NASMFLAGS=-DWITHFAT32 $(NASMFLAGS)
|
2001-11-04 22:43:35 +01:00
|
|
|
!endif
|
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
NASMFLAGS=-fobj -i../hdr/ -D$(COMPILER) -DXCPU=$(XCPU) $(NASMFLAGS)
|
2001-11-14 00:36:45 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
BINPATH=$(BASE)\bin
|
|
|
|
INCLUDEPATH=$(BASE)\include
|
|
|
|
LIBPATH=$(BASE)\lib
|
2002-01-23 23:29:41 +01:00
|
|
|
INITPATCH=@rem
|
2001-11-04 22:43:35 +01:00
|
|
|
|
2004-09-02 22:22:05 +02:00
|
|
|
!if $(LOADSEG)0 == 0
|
|
|
|
LOADSEG=0x60
|
|
|
|
!endif
|
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
UPXOPT=-U
|
|
|
|
!if $(__MAKE__)0 == 0 # NMAKE/WMAKE
|
|
|
|
!if "$(XUPX)" == "" # TC doesn't supports this
|
|
|
|
XUPX=rem # NMAKE doesn't supports @ in macro
|
|
|
|
UPXOPT=
|
|
|
|
!endif
|
|
|
|
!else # TC/BC MAKE
|
|
|
|
!if !$d(XUPX) # NMAKE/WMAKE doesn't supports $d()
|
|
|
|
XUPX=@rem
|
|
|
|
UPXOPT=
|
|
|
|
!endif
|
|
|
|
!endif
|
|
|
|
|
2001-11-04 22:43:35 +01:00
|
|
|
!include "..\mkfiles\$(COMPILER).mak"
|
|
|
|
|
2004-04-11 14:21:25 +02:00
|
|
|
TARGET=$(TARGET)$(XCPU)$(XFAT)
|
2004-07-09 04:16:31 +02:00
|
|
|
INITCFLAGS=$(INITCFLAGS) $(ALLCFLAGS)
|
|
|
|
CFLAGS=$(CFLAGS) $(ALLCFLAGS)
|
2001-11-14 00:36:45 +01:00
|
|
|
RM=..\utils\rmfiles
|
2004-07-09 04:16:31 +02:00
|
|
|
DEPENDS=makefile ..\*.bat ..\mkfiles\*.*
|
|
|
|
|
|
|
|
# Implicit Rules #######################################################
|
|
|
|
|
|
|
|
.asm.obj:
|
|
|
|
$(NASM) $(NASMFLAGS) $<
|
2001-11-04 22:43:35 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
.c.obj:
|
|
|
|
$(CC) $(CFLAGS) $<
|
2001-11-04 22:43:35 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
.cpp.obj:
|
|
|
|
$(CC) $(CFLAGS) $<
|
2001-11-04 22:43:35 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
.c.com:
|
|
|
|
$(CL) $(CFLAGST) $<
|
2001-11-04 22:43:35 +01:00
|
|
|
|
2004-07-09 04:16:31 +02:00
|
|
|
.c.exe:
|
|
|
|
$(CL) $(CFLAGSC) $<
|