Convert the watcom makefiles for use with wine under Linux

git-svn-id: svn://svn.cc65.org/cc65/trunk@2598 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-11-02 21:46:00 +00:00
parent e2c4314258
commit 5b3d0ddaf9
11 changed files with 357 additions and 227 deletions

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = ar65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -56,35 +72,33 @@ OBJS = add.obj \
objdata.obj \ objdata.obj \
objfile.obj objfile.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: ar65 all: $(EXE)
ar65: ar65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
ar65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist ar65.exe del ar65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip ar65.exe @-$(WSTRIP) $(EXE)

View File

@@ -23,6 +23,9 @@ LNKCFG = ld.tmp
# Program arguments # Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = ca65.exe
# Create NT programs by default # Create NT programs by default
ifndef TARGET ifndef TARGET
TARGET = NT TARGET = NT
@@ -95,16 +98,14 @@ LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: ca65 all: $(EXE)
ca65: ca65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
ca65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@@ -114,9 +115,11 @@ ca65.exe: $(OBJS) $(LIBS)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist ca65.exe del ca65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-$(WSTRIP) ca65.exe @-$(WSTRIP) $(EXE)

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = cc65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -41,7 +57,7 @@ CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# All library OBJ files # All OBJ files
OBJS = anonname.obj \ OBJS = anonname.obj \
asmcode.obj \ asmcode.obj \
@@ -107,34 +123,34 @@ OBJS = anonname.obj \
typeconv.obj \ typeconv.obj \
util.obj util.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: cc65 all: $(EXE)
cc65: cc65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
cc65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist cc65.exe del cc65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip cc65.exe @-$(WSTRIP) $(EXE)

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = cl65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -47,34 +63,34 @@ OBJS = error.obj \
global.obj \ global.obj \
main.obj main.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: cl65 all: $(EXE)
cl65: cl65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
cl65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist cl65.exe del cl65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip cl65.exe @-$(WSTRIP) $(EXE)

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = co65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -51,34 +67,34 @@ OBJS = convert.obj \
model.obj \ model.obj \
o65.obj o65.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: co65 all: $(EXE)
co65: co65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
co65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist co65.exe del co65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip co65.exe @-$(WSTRIP) $(EXE)

View File

@@ -95,8 +95,11 @@ $(LIB): $(OBJS)
@echo Done! @echo Done!
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist $(LIB) del $(LIB)
zap: clean
@rm -f *.obj $(LIB)

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = da65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -60,34 +76,34 @@ OBJS = attrtab.obj \
scanner.obj scanner.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: da65 all: $(EXE)
da65: da65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
da65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist *.obj del da65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip da65.exe @-$(WSTRIP) $(EXE)

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = grc.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -45,36 +61,34 @@ CFLAGS += -i=..\common
OBJS = grc.obj OBJS = grc.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: grc all: $(EXE)
.PHONY: grc
grc: grc.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
grc.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist grc.exe del grc.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip grc.exe @-$(WSTRIP) $(EXE)

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = ld65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -72,35 +88,34 @@ OBJS = asserts.obj \
spool.obj \ spool.obj \
tgtcfg.obj tgtcfg.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: ld65 all: $(EXE)
ld65: ld65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
ld65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist *.obj del ld65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip ld65.exe @-$(WSTRIP) $(EXE)

View File

@@ -17,21 +17,24 @@ SUBDIRS = \
all: nt all: nt
nt: nt:
for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=NT -C %%i -f make\watcom.mak for i in $(SUBDIRS); do $(MAKE) TARGET=NT -C $${i} -f make/watcom.mak; done
dos: dos:
for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=DOS32 -C %%i -f make\watcom.mak for i in $(SUBDIRS); do $(MAKE) TARGET=DOS32 -C $${i} -f make/watcom.mak; done
os2: os2:
for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=OS2 -C %%i -f make\watcom.mak for i in $(SUBDIRS); do $(MAKE) TARGET=OS2 -C $${i} -f make/watcom.mak; done
clean: clean:
for %%i in ($(SUBDIRS)) do $(MAKE) -C %%i -f make\watcom.mak clean for i in $(SUBDIRS); do $(MAKE) -C $${i} -f make/watcom.mak clean; done
zap:
for i in $(SUBDIRS); do $(MAKE) -C $${i} -f make/watcom.mak zap; done
strip: strip:
for %%i in ($(SUBDIRS)) do $(MAKE) -C %%i -f make\watcom.mak strip for i in $(SUBDIRS); do $(MAKE) -C $${i} -f make/watcom.mak strip; done

View File

@@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Generic stuff # Generic stuff
AR = WLIB # Environment variables for the watcom compiler
LD = WLINK export WATCOM = c:\\watcom
export INCLUDE = $(WATCOM)\\h
# We will use the windows compiler under linux (define as empty for windows)
WINE = wine --
# Programs
AR = $(WINE) WLIB
CC = $(WINE) WCC386
LD = $(WINE) WLINK
WSTRIP = $(WINE) WSTRIP
LNKCFG = ld.tmp LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = od65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 --------------------- # --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2) ifeq ($(TARGET),OS2)
SYSTEM = os2v2 SYSTEM = os2v2
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# -------------------- DOS4G -------------------- # -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32) ifeq ($(TARGET),DOS32)
SYSTEM = dos4g SYSTEM = dos4g
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# --------------------- NT ---------------------- # --------------------- NT ----------------------
ifeq ($(TARGET),NT) ifeq ($(TARGET),NT)
SYSTEM = nt SYSTEM = nt
CC = WCC386 CFLAGS += -bt=$(TARGET)
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Implicit rules # Implicit rules
@@ -41,7 +57,7 @@ CFLAGS += -i=..\common
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# All library OBJ files # All OBJ files
OBJS = dump.obj \ OBJS = dump.obj \
error.obj \ error.obj \
@@ -49,36 +65,34 @@ OBJS = dump.obj \
global.obj \ global.obj \
main.obj main.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Main targets # Main targets
all: od65 all: $(EXE)
.PHONY: od65
od65: od65.exe
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Other targets # Other targets
od65.exe: $(OBJS) $(LIBS) $(EXE): $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG) @echo "DEBUG ALL" > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG) @echo "OPTION QUIET" >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG) @echo "NAME $@" >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG) @for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG) @for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG) @$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG) @rm $(LNKCFG)
clean: clean:
@if exist *.obj del *.obj @rm -f *~ core
@if exist od65.exe del od65.exe
zap: clean
@rm -f *.obj $(EXE)
strip: strip:
@-wstrip od65.exe @-$(WSTRIP) $(EXE)