StringEscape.c: support full range of C escape characters
[rofl0r-agsutils.git] / Makefile
blob1ac8e408947a28a6b4cb1508b48cce76a7c30ab0
1 prefix=/usr/local
2 bindir=$(prefix)/bin
4 PROGS_SRCS = \
5 agstract.c \
6 agspack.c \
7 agscriptxtract.c \
8 agssemble.c \
9 agsdisas.c \
10 agssim.c \
11 agsprite.c \
12 agsalphahack.c \
13 agsinject.c
15 PROGS_OBJS = $(PROGS_SRCS:.c=.o)
16 CPROGS = $(PROGS_SRCS:.c=)
17 PROGS = $(CPROGS) agsoptimize agsex
19 LIB_SRCS = \
20 Assembler.c \
21 ByteArray.c \
22 Clib32.c \
23 DataFile.c \
24 File.c \
25 List.c \
26 MemGrow.c \
27 RoomFile.c \
28 Script.c \
29 preproc.c \
30 tokenizer.c \
31 SpriteFile.c \
32 rle.c \
33 StringEscape.c
35 LIB_OBJS = $(LIB_SRCS:.c=.o)
37 CFLAGS_WARN = -Wall -Wextra -Wno-unknown-pragmas -Wno-sign-compare
39 -include config.mak
41 all: $(PROGS)
43 $(PROGS): $(LIB_OBJS)
45 %.o: %.c
46 $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_WARN) -o $@ -c $<
48 %: %.o $(LIB_OBJS)
49 $(CC) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_WARN) -o $@ $^ $(LDFLAGS)
51 rcb:
52 make -f Makefile.binary FNAME=agstract
53 make -f Makefile.binary FNAME=agspack
54 make -f Makefile.binary FNAME=agscriptxtract
55 make -f Makefile.binary FNAME=agssemble
56 make -f Makefile.binary FNAME=agsdisas
57 make -f Makefile.binary FNAME=agsinject
58 make -f Makefile.binary FNAME=agssim
60 clean:
61 rm -f $(CPROGS) $(LIB_OBJS) $(PROGS_OBJS)
62 rm -f *.out
63 rm -f *.o
64 rm -f *.rcb
66 install: $(PROGS:%=$(DESTDIR)$(bindir)/%)
68 $(DESTDIR)$(bindir)/%: %
69 install -D -m 755 $< $@
71 .PHONY: all clean