summaryrefslogtreecommitdiff
path: root/trunk/Makefile
blob: a4cc9b9cda0c24be7c9e332cadee27d9b1843a61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
AR = ar
CC = gcc
LD = gcc
ARFLAGS = -cru
CFLAGS = -Wall -Wextra -Wundef -Wpointer-arith -Wcast-align \
	-Wwrite-strings -Wstrict-prototypes \
	-Wnested-externs -Werror -pedantic -std=c99 \
	-Wno-format-zero-length -Wformat-security -Wstrict-aliasing=2 \
	-Wmissing-format-attribute \
	-Wformat=2 -Werror-implicit-function-declaration
LDFLAGS = -L./
#-Wmissing-declarations -Wmissing-prototypes 

example: librosprite.a example.o
	${LD} -g -o $@ example.o ${LDFLAGS} -lrosprite -lSDL

palette2c: librosprite.a palette2c.o
	${LD} -g -o $@ palette2c.o ${LDFLAGS} -lrosprite

librosprite.a: librosprite.o
	${AR} ${ARFLAGS} librosprite.a librosprite.o

%.o: %.c
	${CC} -c -g ${CFLAGS} -o $@ $<

clean:
	rm -f $(wildcard *.o) $(wildcard *.a) example palette