Files
cc65/src/ar65/make/gcc.mak
uz b8e665e837 Change the makefiles so that CFLAGS that are special for the application are
appended after assigning the base value to CFLAGS. This allows to change
CFLAGS on the command line without too much hassle.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4219 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-24 15:07:11 +00:00

72 lines
1.2 KiB
Makefile

#
# gcc Makefile for ar65
#
# ------------------------------------------------------------------------------
# The executable to build
EXE = ar65
# Library dir
COMMON = ../common
#
CC = gcc
CFLAGS = -g -O2 -Wall -W -std=c89
CFLAGS += -I$(COMMON)
EBIND = emxbind
LDFLAGS =
# -----------------------------------------------------------------------------
# List of all object files
OBJS = add.o \
del.o \
error.o \
exports.o \
extract.o \
fileio.o \
global.o \
library.o \
list.o \
main.o \
objdata.o \
objfile.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