First import

git-svn-id: svn://svn.cc65.org/cc65/trunk@1942 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2003-02-08 16:32:55 +00:00
parent b28cf4cfd8
commit bbb70a2d47
12 changed files with 1700 additions and 0 deletions

52
src/co65/make/gcc.mak Normal file
View File

@@ -0,0 +1,52 @@
#
# gcc Makefile for co65
#
# Library dir
COMMON = ../common
CFLAGS = -g -O2 -Wall -W -I$(COMMON)
CC = gcc
EBIND = emxbind
LDFLAGS =
OBJS = error.o \
fileio.o \
global.o \
main.o \
o65.o
LIBS = $(COMMON)/common.a
EXECS = co65
.PHONY: all
ifeq (.depend,$(wildcard .depend))
all : $(EXECS)
include .depend
else
all: depend
@$(MAKE) -f make/gcc.mak all
endif
co65: $(OBJS) $(LIBS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)
@if [ $(OS2_SHELL) ] ; then $(EBIND) $@ ; fi
clean:
rm -f *~ core *.lst
zap: clean
rm -f *.o $(EXECS) .depend
# ------------------------------------------------------------------------------
# Make the dependencies
.PHONY: depend dep
depend dep: $(OBJS:.o=.c)
@echo "Creating dependency information"
$(CC) -I$(COMMON) -MM $^ > .depend

82
src/co65/make/watcom.mak Normal file
View File

@@ -0,0 +1,82 @@
#
# CO65 Makefile for the Watcom compiler (using GNU make)
#
# ------------------------------------------------------------------------------
# Generic stuff
AR = WLIB
LD = WLINK
LNKCFG = ld.tmp
# --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CC = WCC386
CFLAGS = -bt=$(TARGET) -d1 -onatx -zp4 -5 -zq -w2
endif
# Add the include dir
CFLAGS += -i=..\common
# ------------------------------------------------------------------------------
# Implicit rules
%.obj: %.c
$(CC) $(CFLAGS) $^
# ------------------------------------------------------------------------------
# All library OBJ files
OBJS = error.obj \
fileio.obj \
global.obj \
main.obj \
o65.obj
LIBS = ..\common\common.lib
# ------------------------------------------------------------------------------
# Main targets
all: co65
co65: co65.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)
@rm $(LNKCFG)
clean:
@if exist *.obj del *.obj
@if exist co65.exe del co65.exe
strip:
@-wstrip co65.exe