Files
cc65/src/sp65/make/gcc.mak
uz e4aab75bb0 Added a module for assembler source output.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5562 b7a2c559-68d2-44c3-8de9-860c34a00d81
2012-02-27 18:17:28 +00:00

71 lines
1.3 KiB
Makefile

#
# Makefile for the sp65 sprite and bitmap utility utility
#
# ------------------------------------------------------------------------------
# The executable to build
EXE = sp65
# 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 = asm.o \
bin.o \
bitmap.o \
color.o \
error.o \
fileio.o \
input.o \
main.o \
palette.o \
pcx.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