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