build: Update Loaders symbols (Add JP2 funcs)
[gfxprim/pasky.git] / build / Makefile
blobd21da7ad3c103b7304523433e0e69f1de3db9766
1 LIB_OBJECTS=$(shell ./get_objs.sh)
3 .SUFFIXES:
5 include ../libver.mk
7 LIB_NAME=libGP
9 STATIC_LIB=$(LIB_NAME).$(LIB_VERSION).a
10 DYNAMIC_LIB=$(LIB_NAME).so.$(LIB_VERSION).$(LIB_RELEASE)
11 SONAME=$(LIB_NAME).so.$(LIB_MAJOR)
12 SYMLINKS=$(LIB_NAME).so.$(LIB_MAJOR) $(LIB_NAME).so
14 all: $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS)
16 rebuild: all
18 distclean: clean
20 clean:
21 ifdef VERBOSE
22 rm -rf $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS)
23 else
24 @echo "RM $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS)"
25 @rm -rf $(STATIC_LIB) $(DYNAMIC_LIB) $(SYMLINKS)
26 endif
28 $(STATIC_LIB): $(LIB_OBJECTS)
29 ifdef VERBOSE
30 $(AR) rcs $@ $^
31 else
32 @echo "AR $@"
33 @$(AR) rcs $@ $^
34 endif
36 $(DYNAMIC_LIB): $(LIB_OBJECTS)
37 ifdef VERBOSE
38 $(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$(SONAME) $^ -o $@
39 else
40 @echo "LD $@"
41 @$(CC) -fPIC -dPIC --shared -Wl,-soname -Wl,$(SONAME) $^ -o $@
42 endif
44 $(SYMLINKS): $(DYNAMIC_LIB)
45 ifdef VERBOSE
46 rm -f $@
47 ln -s $< $@
48 else
49 @echo "LN $@"
50 @rm -f $@
51 @ln -s $< $@
52 endif