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