1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-11 11:30:13 +00:00

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
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -56,35 +72,33 @@ OBJS = add.obj \
objdata.obj \
objfile.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: ar65
ar65: ar65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
ar65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist ar65.exe del ar65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip ar65.exe
@-$(WSTRIP) $(EXE)

View File

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

View File

@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -41,7 +57,7 @@ CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# All library OBJ files
# All OBJ files
OBJS = anonname.obj \
asmcode.obj \
@ -107,34 +123,34 @@ OBJS = anonname.obj \
typeconv.obj \
util.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: cc65
cc65: cc65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
cc65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist cc65.exe del cc65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip cc65.exe
@-$(WSTRIP) $(EXE)

View File

@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -47,34 +63,34 @@ OBJS = error.obj \
global.obj \
main.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: cl65
cl65: cl65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
cl65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist cl65.exe del cl65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip cl65.exe
@-$(WSTRIP) $(EXE)

View File

@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -51,34 +67,34 @@ OBJS = convert.obj \
model.obj \
o65.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: co65
co65: co65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
co65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist co65.exe del co65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip co65.exe
@-$(WSTRIP) $(EXE)

View File

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

View File

@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -60,34 +76,34 @@ OBJS = attrtab.obj \
scanner.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: da65
da65: da65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
da65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist *.obj del da65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip da65.exe
@-$(WSTRIP) $(EXE)

View File

@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -45,36 +61,34 @@ CFLAGS += -i=..\common
OBJS = grc.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: grc
.PHONY: grc
grc: grc.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
grc.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist grc.exe del grc.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip grc.exe
@-$(WSTRIP) $(EXE)

View File

@ -5,34 +5,50 @@
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -72,35 +88,34 @@ OBJS = asserts.obj \
spool.obj \
tgtcfg.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: ld65
ld65: ld65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
ld65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist *.obj del ld65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip ld65.exe
@-$(WSTRIP) $(EXE)

View File

@ -17,21 +17,24 @@ SUBDIRS = \
all: nt
nt:
for %%i in ($(SUBDIRS)) do $(MAKE) TARGET=NT -C %%i -f make\watcom.mak
nt:
for i in $(SUBDIRS); do $(MAKE) TARGET=NT -C $${i} -f make/watcom.mak; done
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:
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:
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:
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
AR = WLIB
LD = WLINK
# Environment variables for the watcom compiler
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
# 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 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
CFLAGS += -bt=$(TARGET)
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
@ -41,7 +57,7 @@ CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# All library OBJ files
# All OBJ files
OBJS = dump.obj \
error.obj \
@ -49,36 +65,34 @@ OBJS = dump.obj \
global.obj \
main.obj
LIBS = ..\common\common.lib
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: od65
.PHONY: od65
od65: od65.exe
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
od65.exe: $(OBJS) $(LIBS)
@echo DEBUG ALL > $(LNKCFG)
@echo OPTION QUIET >> $(LNKCFG)
@echo NAME $@ >> $(LNKCFG)
@for %%i in ($(OBJS)) do echo FILE %%i >> $(LNKCFG)
@for %%i in ($(LIBS)) do echo LIBRARY %%i >> $(LNKCFG)
$(LD) system $(SYSTEM) @$(LNKCFG)
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "NAME $@" >> $(LNKCFG)
@for i in $(OBJS); do echo "FILE $${i}"; done >> $(LNKCFG)
@for i in $(LIBS); do echo "LIBRARY $${i}"; done >> $(LNKCFG)
@$(LD) system $(SYSTEM) @$(LNKCFG)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist od65.exe del od65.exe
@rm -f *~ core
zap: clean
@rm -f *.obj $(EXE)
strip:
@-wstrip od65.exe
@-$(WSTRIP) $(EXE)