X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=src%2Fcommon%2Fmake%2Fwatcom.mak;h=46efdbacc01eb5918d536ad2d68f449f3df5e6e5;hb=3d1ee0f974987bbe27da2710ed40cca6af01403a;hp=f71b1d5137b47257164071a97183a4fc49cb2686;hpb=a5489728ae228ecb2def5769ea5c1b9be4221fa6;p=cc65 diff --git a/src/common/make/watcom.mak b/src/common/make/watcom.mak index f71b1d513..46efdbacc 100644 --- a/src/common/make/watcom.mak +++ b/src/common/make/watcom.mak @@ -1,64 +1,92 @@ # -# 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) +export WINEDEBUG=fixme-all +WINE = wine + +# Programs +AR = $(WINE) wlib +CC = $(WINE) wcc386 +LD = $(WINE) wlink LIB = common.lib +# Program arguments +CFLAGS = -d1 -obeilr -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 # ------------------------------------------------------------------------------ # Implicit rules %.obj: %.c - $(CC) $(CFLAGS) $^ + $(CC) $(CFLAGS) -fo=$@ $^ # ------------------------------------------------------------------------------ # All library OBJ files OBJS = abend.obj \ + addrsize.obj \ bitops.obj \ chartype.obj \ check.obj \ cmdline.obj \ coll.obj \ + cpu.obj \ + debugflag.obj \ exprdefs.obj \ filepos.obj \ + filetype.obj \ fname.obj \ + fp.obj \ hashstr.obj \ + hashtab.obj \ + intstack.obj \ matchpat.obj \ + mmodel.obj \ print.obj \ + searchpath.obj \ segdefs.obj \ + segnames.obj \ + shift.obj \ strbuf.obj \ + strpool.obj \ + strstack.obj \ strutil.obj \ target.obj \ tgttrans.obj \ - wildargv.obj \ + version.obj \ + wildargv.obj \ xmalloc.obj \ xsprintf.obj @@ -75,10 +103,17 @@ $(LIB): $(OBJS) $(AR) -q -b -P=32 $(LIB) $(foreach OBJ, $(OBJS), +-$(OBJ)) @echo Done! +wildargv.obj: + $(CC) $(CFLAGS) -fo=$@ $(WATCOM)\\src\\startup\\wildargv.c + clean: - @if exist *.obj del *.obj - @if exist $(LIB) del $(LIB) + @rm -f *~ core + +zap: clean + @rm -f *.obj $(LIB) +strip: + @true