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