Fix shared library instructions
This commit is contained in:
parent
35b50246f4
commit
4206849da9
1 changed files with 9 additions and 11 deletions
20
Makefile
20
Makefile
|
@ -19,7 +19,6 @@ SDL_CFLAGS != pkg-config --cflags sdl
|
|||
SDL_LIBS != pkg-config --libs sdl
|
||||
|
||||
LIB_VERSION = 1.0
|
||||
LIB_SONAME = libquirc.so.1
|
||||
|
||||
QUIRC_CFLAGS = -O3 -Wall -Ilib $(CFLAGS) $(SDL_CFLAGS)
|
||||
LIB_OBJ = \
|
||||
|
@ -53,27 +52,26 @@ libquirc.a: $(LIB_OBJ)
|
|||
ar cru $@ $^
|
||||
ranlib $@
|
||||
|
||||
libquirc.so: $(LIB_OBJ)
|
||||
$(CC) -shared -Wl,-soname=$(LIB_SONAME) -o $@ $^ -lm
|
||||
.PHONY: libquirc.so
|
||||
libquirc.so: libquirc.so.$(LIB_VERSION)
|
||||
|
||||
libquirc.so.$(LIB_VERSION): $(LIB_OBJ)
|
||||
$(CC) -shared -o $@ $^ -lm
|
||||
|
||||
%.o: %.c
|
||||
$(CC) -fPIC $(QUIRC_CFLAGS) -o $*.o -c $*.c
|
||||
|
||||
install: libquirc.a libquirc.so quirc-demo quirc-scanner
|
||||
install: libquirc.a libquirc.so.$(LIB_VERSION) quirc-demo quirc-scanner
|
||||
install -o root -g root -m 0644 lib/quirc.h $(DESTDIR)$(PREFIX)/include
|
||||
install -o root -g root -m 0644 libquirc.a $(DESTDIR)$(PREFIX)/lib
|
||||
install -o root -g root -m 0755 libquirc.so \
|
||||
$(DESTDIR)$(PREFIX)/lib/libquirc.so.$(LIB_VERSION)
|
||||
ln -sf libquirc.so.$(LIB_VERSION) $(DESTDIR)$(PREFIX)/lib/$(LIB_SONAME)
|
||||
ln -sf libquirc.so.$(LIB_VERSION) $(DESTDIR)$(PREFIX)/lib/libquirc.so
|
||||
install -o root -g root -m 0755 libquirc.so.$(LIB_VERSION) \
|
||||
$(DESTDIR)$(PREFIX)/lib
|
||||
install -o root -g root -m 0755 quirc-demo $(DESTDIR)$(PREFIX)/bin
|
||||
install -o root -g root -m 0755 quirc-scanner $(DESTDIR)$(PREFIX)/bin
|
||||
|
||||
uninstall:
|
||||
rm -f $(DESTDIR)$(PREFIX)/include/quirc.h
|
||||
rm -f $(DESTDIR)$(PREFIX)/lib/libquirc.so.$(LIB_VERSION)
|
||||
rm -f $(DESTDIR)$(PREFIX)/lib/$(LIB_SONAME)
|
||||
rm -f $(DESTDIR)$(PREFIX)/lib/libquirc.so
|
||||
rm -f $(DESTDIR)$(PREFIX)/lib/libquirc.a
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/quirc-demo
|
||||
rm -f $(DESTDIR)$(PREFIX)/bin/quirc-scanner
|
||||
|
@ -82,7 +80,7 @@ clean:
|
|||
rm -f */*.o
|
||||
rm -f */*.lo
|
||||
rm -f libquirc.a
|
||||
rm -f libquirc.so
|
||||
rm -f libquirc.so.$(LIB_VERSION)
|
||||
rm -f qrtest
|
||||
rm -f inspect
|
||||
rm -f quirc-demo
|
||||
|
|
Loading…
Reference in a new issue