9988bc9a21ab3db1e271352507db59a5f411551f
[raydungeon] / libs / libs.mk
1 # included from a makefile which defines libname, src
2
3 obj = $(src:.c=.o)
4 lib = $(libname).a
5
6 CFLAGS = -pedantic -Wall -g
7
8 ifeq ($(sys), mingw)
9         obj = $(src:.c=.w32.o)
10         lib = $(libname).w32.a
11 endif
12
13 $(lib): $(obj)
14         $(AR) rcs $@ $(obj)
15
16 %.w32.o: %.c
17         $(CC) -c $< $(CFLAGS) -o $@
18
19 .PHONY: clean
20 clean:
21         rm -f $(obj) $(lib)