From: cuz Date: Sun, 2 Nov 2003 21:18:25 +0000 (+0000) Subject: Converted the makefile to use wine under Linux X-Git-Tag: V2.12.0~1201 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e2c4314258b7b2112c28bafb5352df763607d8ae;p=cc65 Converted the makefile to use wine under Linux git-svn-id: svn://svn.cc65.org/cc65/trunk@2597 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/make/watcom.mak b/src/ca65/make/watcom.mak index 0f3813acc..e1ce7f0cb 100644 --- a/src/ca65/make/watcom.mak +++ b/src/ca65/make/watcom.mak @@ -5,34 +5,47 @@ # ------------------------------------------------------------------------------ # 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 + +# 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 @@ -76,28 +89,28 @@ OBJS = anonname.obj \ toklist.obj \ ulabel.obj -LIBS = ..\common\common.lib +LIBS = ../common/common.lib # ------------------------------------------------------------------------------ # Main targets -all: ca65 +all: ca65 -ca65: ca65.exe +ca65: ca65.exe # ------------------------------------------------------------------------------ # Other targets -ca65.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) +ca65.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: @@ -105,5 +118,5 @@ clean: @if exist ca65.exe del ca65.exe strip: - @-wstrip ca65.exe + @-$(WSTRIP) ca65.exe diff --git a/src/common/make/watcom.mak b/src/common/make/watcom.mak index bdd08a2f9..f59878c9a 100644 --- a/src/common/make/watcom.mak +++ b/src/common/make/watcom.mak @@ -1,34 +1,47 @@ # -# CC65 Makefile for the Watcom compiler (using GNU make) +# CC65 Makefile for the Watcom compiler (using GNU make) and wine # # ------------------------------------------------------------------------------ # 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 LIB = common.lib +# Program arguments +CFLAGS = -d1 -onatx -zp4 -5 -zq -w2 + +# 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 # ------------------------------------------------------------------------------ @@ -65,7 +78,6 @@ OBJS = abend.obj \ strutil.obj \ target.obj \ tgttrans.obj \ - wildargv.obj \ xmalloc.obj \ xsprintf.obj @@ -88,5 +100,3 @@ clean: - -