]> git.sur5r.net Git - cc65/blob - src/sp65/make/gcc.mak
Added conversion to GEOS icon format (which is actually identical to the VIC2
[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         c.o             \
30         color.o         \
31         convert.o       \
32         error.o         \
33         fileio.o        \
34         geosicon.o      \
35         input.o         \
36         koala.o         \
37         lynxsprite.o    \
38         main.o          \
39         output.o        \
40         palette.o       \
41         pcx.o           \
42         vic2sprite.o
43
44 LIBS = $(COMMON)/common.a
45
46 # ------------------------------------------------------------------------------
47 # Makefile targets
48
49 # Main target - must be first
50 .PHONY: all
51 ifeq (.depend,$(wildcard .depend))
52 all:    $(EXE)
53 include .depend
54 else
55 all:    depend
56         @$(MAKE) -f make/gcc.mak all
57 endif
58
59 $(EXE): $(OBJS) $(LIBS)
60         $(CC) $(LDFLAGS) $^ -o $@
61         @if [ $(OS2_SHELL) ] ;  then $(EBIND) $(EXE) ; fi
62
63 clean:
64         $(RM) *~ core.* *.map
65
66 zap:    clean
67         $(RM) *.o $(EXE) .depend
68
69 # ------------------------------------------------------------------------------
70 # Make the dependencies
71
72 .PHONY: depend dep
73 depend dep:     $(OBJS:.o=.c)
74         @echo "Creating dependency information"
75         $(CC) $(CFLAGS) -MM $^ > .depend
76
77
78