]> git.sur5r.net Git - cc65/blob - src/sp65/make/gcc.mak
Started to add koala output format.
[cc65] / src / sp65 / make / gcc.mak
1 #
2 # Makefile for the sp65 sprite and bitmap utility utility
3 #
4
5
6 # ------------------------------------------------------------------------------
7
8 # The executable to build
9 EXE     = sp65
10
11 # Library dir
12 COMMON  = ../common
13
14 #
15 CC      = gcc
16 CFLAGS  = -O2 -g -Wall -W -std=c89
17 override CFLAGS += -I$(COMMON)
18 EBIND   = emxbind
19 LDFLAGS =
20
21
22 # -----------------------------------------------------------------------------
23 # List of all object files
24
25 OBJS =  asm.o           \
26         attr.o          \
27         bin.o           \
28         bitmap.o        \
29         color.o         \
30         error.o         \
31         fileio.o        \
32         input.o         \
33         koala.o         \
34         main.o          \
35         output.o        \
36         palette.o       \
37         pcx.o
38
39 LIBS = $(COMMON)/common.a
40
41 # ------------------------------------------------------------------------------
42 # Makefile targets
43
44 # Main target - must be first
45 .PHONY: all
46 ifeq (.depend,$(wildcard .depend))
47 all:    $(EXE)
48 include .depend
49 else
50 all:    depend
51         @$(MAKE) -f make/gcc.mak all
52 endif
53
54 $(EXE): $(OBJS) $(LIBS)
55         $(CC) $(LDFLAGS) $^ -o $@
56         @if [ $(OS2_SHELL) ] ;  then $(EBIND) $(EXE) ; fi
57
58 clean:
59         $(RM) *~ core.* *.map
60
61 zap:    clean
62         $(RM) *.o $(EXE) .depend
63
64 # ------------------------------------------------------------------------------
65 # Make the dependencies
66
67 .PHONY: depend dep
68 depend dep:     $(OBJS:.o=.c)
69         @echo "Creating dependency information"
70         $(CC) $(CFLAGS) -MM $^ > .depend
71
72
73