9 OBJECTS
=GP_SDL_Context.o \
12 .PHONY
: library tests
clean tar install
19 cd tests
&& $(MAKE
) all
21 $(LIBRARY
): $(LIBRARY
).a
$(LIBRARY
).so
25 #############################################################################
27 #############################################################################
29 CFLAGS
=-W
-Wall
-O2
-fPIC
-I..
/..
-I..
/..
/core
32 $(CC
) $(CFLAGS
) $< -c
-o
$@
34 $(LIBRARY
).a
: $(OBJECTS
) $(EXTRA_DEPS
)
37 $(LIBRARY
).so
: $(OBJECTS
) $(EXTRA_DEPS
)
38 $(CC
) -fPIC
-dPIC
--shared
-Wl
,-soname
-Wl
,$@
.0 $(CFLAGS
) $^
-o
$@
41 #############################################################################
42 # Installation, cleanup, and packing.
43 #############################################################################
45 HEADER_LOC
=/usr
/include/
49 install -m
775 -d
$(HEADER_LOC
)GP
/
50 install -m
664 *.h
$(HEADER_LOC
)GP
/
51 install -m
775 -d
$(HEADER_LOC
)GP
/backends
/
52 install -m
664 backends
/*.h
$(HEADER_LOC
)GP
/backends
/
53 install -m
664 *.so
*.so
.0 *.a
$(LIB_LOC
)
57 rm -f
$(LIBRARY
).a
$(LIBRARY
).so
$(LIBRARY
).so
.0
58 cd tests
&& $(MAKE
) clean
61 cd ..
&& tar cjf gfxprim-
`date +%Y-%b-%d`.
tar.bz2 gfxprim