Renamed grc to grc65 to avoid name conflicts with another software named grc.

git-svn-id: svn://svn.cc65.org/cc65/trunk@4875 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2010-11-18 18:47:01 +00:00
parent 81cfbe06c6
commit bb1d6d94a3
13 changed files with 56 additions and 53 deletions

58
src/grc65/make/gcc.mak Normal file
View File

@@ -0,0 +1,58 @@
#
# gcc Makefile for grc
#
# ------------------------------------------------------------------------------
# The executable to build
EXE = grc65
COMMON = ../common
#
CC = gcc
CFLAGS = -g -O2 -Wall -W -std=c89
override CFLAGS += -I$(COMMON)
LDFLAGS =
EBIND = emxbind
# -----------------------------------------------------------------------------
# List of all object files
OBJS = grc65.o
LIBS = $(COMMON)/common.a
# ------------------------------------------------------------------------------
# Makefile targets
# Main target - must be first
.PHONY: all
ifeq (.depend,$(wildcard .depend))
all: $(EXE)
include .depend
else
all: depend
@$(MAKE) -f make/gcc.mak all
endif
$(EXE): $(OBJS) $(LIBS)
$(CC) $(LDFLAGS) $^ -o $@
@if [ $(OS2_SHELL) ] ; then $(EBIND) $(EXE) ; fi
clean:
$(RM) *~ core.* *.map
zap: clean
$(RM) *.o $(EXE) .depend
# ------------------------------------------------------------------------------
# Make the dependencies
.PHONY: depend dep
depend dep: $(OBJS:.o=.c)
@echo "Creating dependency information"
$(CC) $(CFLAGS) -MM $^ > .depend

97
src/grc65/make/watcom.mak Normal file
View File

@@ -0,0 +1,97 @@
#
# GRC Makefile for the Watcom compiler (using GNU make)
#
# ------------------------------------------------------------------------------
# Generic stuff
# 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
WSTRIP = $(WINE) wstrip -q
LNKCFG = ld.tmp
# Program arguments
CFLAGS = -d1 -obeilr -zp4 -5 -zq -w2 -i=..\\common
# Target files
EXE = grc65.exe
# Create NT programs by default
ifndef TARGET
TARGET = NT
endif
# --------------------- OS2 ---------------------
ifeq ($(TARGET),OS2)
SYSTEM = os2v2
CFLAGS += -bt=$(TARGET)
endif
# -------------------- DOS4G --------------------
ifeq ($(TARGET),DOS32)
SYSTEM = dos4g
CFLAGS += -bt=$(TARGET)
endif
# --------------------- NT ----------------------
ifeq ($(TARGET),NT)
SYSTEM = nt
CFLAGS += -bt=$(TARGET)
endif
# ------------------------------------------------------------------------------
# Implicit rules
%.obj: %.c
$(CC) $(CFLAGS) -fo=$@ $^
# ------------------------------------------------------------------------------
# All OBJ files
OBJS = grc65.obj
LIBS = ../common/common.lib
# ------------------------------------------------------------------------------
# Main targets
all: $(EXE)
# ------------------------------------------------------------------------------
# Other targets
$(EXE): $(OBJS) $(LIBS)
@echo "DEBUG ALL" > $(LNKCFG)
@echo "OPTION QUIET" >> $(LNKCFG)
@echo "OPTION MAP" >> $(LNKCFG)
@echo "OPTION STACK=65536" >> $(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:
@rm -f *~ core
zap: clean
@rm -f $(OBJS) $(EXE) $(EXE:.exe=.map)
strip:
@-$(WSTRIP) $(EXE)