mirror of
https://github.com/cc65/cc65.git
synced 2024-12-25 02:29:52 +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:
parent
9a68aa80f6
commit
e2c4314258
@ -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,7 +89,7 @@ OBJS = anonname.obj \
|
||||
toklist.obj \
|
||||
ulabel.obj
|
||||
|
||||
LIBS = ..\common\common.lib
|
||||
LIBS = ../common/common.lib
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -92,12 +105,12 @@ ca65: ca65.exe
|
||||
|
||||
|
||||
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)
|
||||
@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
|
||||
|
||||
|
@ -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:
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user