Files
cc65/src/da65/make/gcc.mak
uz 45f7cc1403 Support for the Mitsubishi 740 CPU for da65. Written and contributed by
Chris Baird, cjb@brushtail.apana.org.au.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5350 b7a2c559-68d2-44c3-8de9-860c34a00d81
2011-12-31 13:09:55 +00:00

82 lines
1.4 KiB
Makefile

#
# gcc Makefile for da65
#
# ------------------------------------------------------------------------------
# The executable to build
EXE = da65
# Library dir
COMMON = ../common
#
CC = gcc
CFLAGS = -g -O2 -Wall -W -std=c89
override CFLAGS += -I$(COMMON)
EBIND = emxbind
LDFLAGS =
# -----------------------------------------------------------------------------
# List of all object files
OBJS = asminc.o \
attrtab.o \
code.o \
comments.o \
data.o \
error.o \
global.o \
handler.o \
infofile.o \
labels.o \
main.o \
opc6502.o \
opc6502x.o \
opc65816.o \
opc65c02.o \
opc65sc02.o \
opchuc6280.o \
opcm740.o \
opctable.o \
output.o \
scanner.o \
segment.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