1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-12 02:30:44 +00:00

Converted the makefile to use wine under Linux

git-svn-id: svn://svn.cc65.org/cc65/trunk@2597 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2003-11-02 21:18:25 +00:00
parent 9a68aa80f6
commit e2c4314258
2 changed files with 57 additions and 34 deletions

View File

@ -5,34 +5,47 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# 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
# 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
@ -76,7 +89,7 @@ OBJS = anonname.obj \
toklist.obj \ toklist.obj \
ulabel.obj ulabel.obj
LIBS = ..\common\common.lib LIBS = ../common/common.lib
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -92,12 +105,12 @@ ca65: ca65.exe
ca65.exe: $(OBJS) $(LIBS) ca65.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:
@ -105,5 +118,5 @@ clean:
@if exist ca65.exe del ca65.exe @if exist ca65.exe del ca65.exe
strip: strip:
@-wstrip ca65.exe @-$(WSTRIP) ca65.exe

View File

@ -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 # 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
LIB = common.lib LIB = common.lib
# Program arguments
CFLAGS = -d1 -onatx -zp4 -5 -zq -w2
# 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
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -65,7 +78,6 @@ OBJS = abend.obj \
strutil.obj \ strutil.obj \
target.obj \ target.obj \
tgttrans.obj \ tgttrans.obj \
wildargv.obj \
xmalloc.obj \ xmalloc.obj \
xsprintf.obj xsprintf.obj
@ -88,5 +100,3 @@ clean: