Converted all Watcom makefiles to use GNU make

git-svn-id: svn://svn.cc65.org/cc65/trunk@1745 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2002-12-12 23:19:53 +00:00
parent 1ec291fa4e
commit a5489728ae
10 changed files with 265 additions and 703 deletions

View File

@@ -1,67 +1,43 @@
# #
# ar65 Makefile for the Watcom compiler # ar65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -96,24 +72,13 @@ ar65: ar65.exe
ar65.exe: $(OBJS) $(LIBS) ar65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE add.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE del.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE error.obj @rm $(LNKCFG)
FILE exports.obj
FILE extract.obj
FILE fileio.obj
FILE global.obj
FILE library.obj
FILE list.obj
FILE main.obj
FILE objdata.obj
FILE objfile.obj
LIBRARY ..\common\common.lib
|
clean: clean:

View File

@@ -1,67 +1,43 @@
# #
# CA65 Makefile for the Watcom compiler # CA65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -111,39 +87,13 @@ ca65: ca65.exe
ca65.exe: $(OBJS) $(LIBS) ca65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE condasm.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE dbginfo.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE ea.obj @rm $(LNKCFG)
FILE error.obj
FILE expr.obj
FILE feature.obj
FILE filetab.obj
FILE fragment.obj
FILE global.obj
FILE incpath.obj
FILE instr.obj
FILE istack.obj
FILE lineinfo.obj
FILE listing.obj
FILE macpack.obj
FILE macro.obj
FILE main.obj
FILE nexttok.obj
FILE objcode.obj
FILE objfile.obj
FILE options.obj
FILE pseudo.obj
FILE repeat.obj
FILE scanner.obj
FILE symtab.obj
FILE toklist.obj
FILE ulabel.obj
LIBRARY ..\common\common.lib
|
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj

View File

@@ -1,67 +1,43 @@
# #
# CC65 Makefile for the Watcom compiler # CC65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -134,8 +110,6 @@ OBJS = anonname.obj \
LIBS = ..\common\common.lib LIBS = ..\common\common.lib
.PRECIOUS $(OBJS:.obj=.c)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
@@ -149,76 +123,13 @@ cc65: cc65.exe
cc65.exe: $(OBJS) $(LIBS) cc65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE anonname.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE asmcode.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE asmlabel.obj @rm $(LNKCFG)
FILE asmstmt.obj
FILE assignment.obj
FILE casenode.obj
FILE codeent.obj
FILE codegen.obj
FILE codelab.obj
FILE codeinfo.obj
FILE codeopt.obj
FILE codeseg.obj
FILE compile.obj
FILE coptadd.obj
FILE coptc02.obj
FILE coptcmp.obj
FILE coptind.obj
FILE coptneg.obj
FILE coptpush.obj
FILE coptsize.obj
FILE coptstop.obj
FILE coptstore.obj
FILE coptsub.obj
FILE copttest.obj
FILE cpu.obj
FILE dataseg.obj
FILE datatype.obj
FILE declare.obj
FILE declattr.obj
FILE error.obj
FILE expr.obj
FILE exprdesc.obj
FILE exprheap.obj
FILE exprnode.obj
FILE funcdesc.obj
FILE function.obj
FILE global.obj
FILE goto.obj
FILE hexval.obj
FILE ident.obj
FILE incpath.obj
FILE input.obj
FILE lineinfo.obj
FILE litpool.obj
FILE locals.obj
FILE loop.obj
FILE macrotab.obj
FILE main.obj
FILE opcodes.obj
FILE preproc.obj
FILE pragma.obj
FILE reginfo.obj
FILE scanner.obj
FILE scanstrbuf.obj
FILE segments.obj
FILE stdfunc.obj
FILE stmt.obj
FILE swstmt.obj
FILE symentry.obj
FILE symtab.obj
FILE textseg.obj
FILE typecast.obj
FILE typecmp.obj
FILE util.obj
LIBRARY ..\common\common.lib
|
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj

View File

@@ -1,66 +1,43 @@
# #
# CL65 Makefile for the Watcom compiler # CL65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -70,7 +47,7 @@ OBJS = error.obj \
global.obj \ global.obj \
main.obj main.obj
.PRECIOUS $(OBJS:.obj=.c) LIBS = ..\common\common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
@@ -84,17 +61,14 @@ cl65: cl65.exe
# Other targets # Other targets
cl65.exe: $(OBJS) cl65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE error.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE global.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE main.obj @rm $(LNKCFG)
LIBRARY ..\common\common.lib
|
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj

View File

@@ -1,65 +1,41 @@
# #
# CC65 Makefile for the Watcom compiler # CC65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LIB = common.lib LIB = common.lib
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -87,8 +63,6 @@ OBJS = abend.obj \
xsprintf.obj xsprintf.obj
.PRECIOUS $(OBJS:.obj=.cc) $(LIB)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
@@ -98,7 +72,7 @@ lib: $(LIB)
$(LIB): $(OBJS) $(LIB): $(OBJS)
@echo Creating library... @echo Creating library...
&@$(AR) -q -b -P=32 $(LIB) +-$? $(AR) -q -b -P=32 $(LIB) $(foreach OBJ, $(OBJS), +-$(OBJ))
@echo Done! @echo Done!
clean: clean:

View File

@@ -1,67 +1,43 @@
# #
# da65 Makefile for the Watcom compiler # da65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -97,24 +73,13 @@ da65: da65.exe
da65.exe: $(OBJS) $(LIBS) da65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE attrtab.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE code.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE config.obj @rm $(LNKCFG)
FILE cpu.obj
FILE data.obj
FILE error.obj
FILE global.obj
FILE handler.obj
FILE main.obj
FILE opctable.obj
FILE output.obj
FILE scanner.obj
LIBRARY ..\common\common.lib
|
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj

View File

@@ -1,63 +1,43 @@
# #
# GRC Makefile for the Watcom compiler # GRC Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else # Add the include dir
!error CFLAGS += -i=..\common
!endif
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -65,13 +45,15 @@ CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
OBJS = grc.obj OBJS = grc.obj
.PRECIOUS $(OBJS:.obj=.c) LIBS = ..\common\common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: grc all: grc
.PHONY: grc
grc: grc.exe grc: grc.exe
@@ -79,15 +61,14 @@ grc: grc.exe
# Other targets # Other targets
grc.exe: $(OBJS) grc.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE grc.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
LIBRARY ..\common\common.lib $(LD) system $(SYSTEM) @$(LNKCFG)
| @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj

View File

@@ -1,67 +1,43 @@
# #
# ld65 Makefile for the Watcom compiler # ld65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -108,36 +84,14 @@ ld65: ld65.exe
ld65.exe: $(OBJS) $(LIBS) ld65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE bin.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE binfmt.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE condes.obj @rm $(LNKCFG)
FILE config.obj
FILE dbginfo.obj
FILE dbgsyms.obj
FILE error.obj
FILE exports.obj
FILE expr.obj
FILE extsyms.obj
FILE fileinfo.obj
FILE fileio.obj
FILE fragment.obj
FILE global.obj
FILE library.obj
FILE lineinfo.obj
FILE main.obj
FILE mapfile.obj
FILE o65.obj
FILE objdata.obj
FILE objfile.obj
FILE scanner.obj
FILE segments.obj
FILE tgtcfg.obj
LIBRARY ..\common\common.lib
|
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj

View File

@@ -8,6 +8,7 @@ SUBDIRS = \
ca65 \ ca65 \
cc65 \ cc65 \
cl65 \ cl65 \
da65 \
grc \ grc \
ld65 \ ld65 \
od65 od65
@@ -16,107 +17,20 @@ all: nt
nt: nt:
cd common for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=NT -C %%i -f make\watcom.mak
make -f make\watcom.mak
cd ..\ar65
make -f make\watcom.mak
cd ..\ca65
make -f make\watcom.mak
cd ..\cc65
make -f make\watcom.mak
cd ..\cl65
make -f make\watcom.mak
cd ..\da65
make -f make\watcom.mak
cd ..\grc
make -f make\watcom.mak
cd ..\ld65
make -f make\watcom.mak
cd ..\od65
make -f make\watcom.mak
cd ..
dos: dos:
cd common for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=DOS32 -C %%i -f make\watcom.mak
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\ar65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\ca65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\cc65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\cl65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\da65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\grc
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\ld65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..\od65
make -DTARGET=DOS32 -f make\watcom.mak
cd ..
os2: os2:
cd common for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=OS2 -C %%i -f make\watcom.mak
make -DTARGET=OS2 -f make\watcom.mak
cd ..\ar65
make -DTARGET=OS2 -f make\watcom.mak
cd ..\ca65
make -DTARGET=OS2 -f make\watcom.mak
cd ..\cc65
make -DTARGET=OS2 -f make\watcom.mak
cd ..\cl65
make -DTARGET=OS2 -f make\watcom.mak
cd ..\da65
make -DTARGET=OS2 -f make\watcom.mak
cd ..\grc
make -DTARGET=OS2 -f make\watcom.mak
cd ..\ld65
make -DTARGET=OS2 -f make\watcom.mak
cd ..\od65
make -DTARGET=OS2 -f make\watcom.mak
cd ..
clean: clean:
cd common for %%i in ($(SUBDIRS)) do $(MAKE) -C %%i -f make\watcom.mak clean
make -f make\watcom.mak clean
cd ..\ar65
make -f make\watcom.mak clean
cd ..\ca65
make -f make\watcom.mak clean
cd ..\cc65
make -f make\watcom.mak clean
cd ..\cl65
make -f make\watcom.mak clean
cd ..\da65
make -f make\watcom.mak clean
cd ..\grc
make -f make\watcom.mak clean
cd ..\ld65
make -f make\watcom.mak clean
cd ..\od65
make -f make\watcom.mak clean
cd ..
strip: strip:
@cd ar65 for %%i in ($(SUBDIRS)) do $(MAKE) -C %%i -f make\watcom.mak strip
@-make -f make\watcom.mak strip
@cd ..\ca65
@-make -f make\watcom.mak strip
@cd ..\cc65
@-make -f make\watcom.mak strip
@cd ..\cl65
@-make -f make\watcom.mak strip
@cd ..\da65
@-make -f make\watcom.mak strip
@cd ..\grc
@-make -f make\watcom.mak strip
@cd ..\ld65
@-make -f make\watcom.mak strip
@cd ..\od65
@-make -f make\watcom.mak strip
@cd ..

View File

@@ -1,67 +1,43 @@
# #
# OD65 Makefile for the Watcom compiler # OD65 Makefile for the Watcom compiler (using GNU make)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
.AUTODEPEND
.SUFFIXES .ASM .C .CC .CPP
.SWAP
AR = WLIB AR = WLIB
LD = WLINK LD = WLINK
LNKCFG = ld.tmp
!if !$d(TARGET)
!if $d(__OS2__)
TARGET = OS2
!else
TARGET = NT
!endif
!endif
# target specific macros.
!if $(TARGET)==OS2
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS32
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!elif $(TARGET)==DOS
# --------------------- DOS ---------------------
SYSTEM = dos
CC = WCC
CCCFG = -bt=$(TARGET) -d1 -onatx -zp2 -2 -ml -zq -w2
!elif $(TARGET)==NT
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CC = WCC386
CCCFG = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2 CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
!else
!error
!endif
# Add the include dir # Add the include dir
CCCFG = $(CCCFG) -i=..\common CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
.c.obj: %.obj: %.c
$(CC) $(CCCFG) $< $(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@@ -81,6 +57,8 @@ LIBS = ..\common\common.lib
all: od65 all: od65
.PHONY: od65
od65: od65.exe od65: od65.exe
@@ -89,17 +67,13 @@ od65: od65.exe
od65.exe: $(OBJS) $(LIBS) od65.exe: $(OBJS) $(LIBS)
$(LD) system $(SYSTEM) @&&| @echo DEBUG ALL > $(LNKCFG)
DEBUG ALL @echo OPTION QUIET >> $(LNKCFG)
OPTION QUIET @echo NAME $@ >> $(LNKCFG)
NAME $< @for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
FILE dump.obj @for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
FILE error.obj $(LD) system $(SYSTEM) @$(LNKCFG)
FILE fileio.obj @rm $(LNKCFG)
FILE global.obj
FILE main.obj
LIBRARY ..\common\common.lib
|
clean: clean:
@if exist *.obj del *.obj @if exist *.obj del *.obj