Files
cc65/src/od65/make/gcc.mak
uz 4056e97587 Use "override" when appending to CFLAGS, so this works even when CFLAGS is
specified on the command line.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4271 b7a2c559-68d2-44c3-8de9-860c34a00d81
2009-09-29 13:06:35 +00:00

66 lines
1.2 KiB
Makefile

#
# Makefile for the od65 object file dump utility
#
# ------------------------------------------------------------------------------
# The executable to build
EXE = od65
# Library dir
COMMON = ../common
#
CC = gcc
CFLAGS = -O2 -g -Wall -W -std=c89
override CFLAGS += -I$(COMMON)
EBIND = emxbind
LDFLAGS =
# -----------------------------------------------------------------------------
# List of all object files
OBJS = dump.o \
error.o \
fileio.o \
global.o \
main.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