blob: ac55af7f44ed092ad2f18c04b876e289c530c4f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
CC=gcc
CFLAGS+= -fPIC
SONAMES:= libhallo.so.1
LIBFILES:= $(patsubst %,%.0.1, $(SONAMES))
all: $(LIBFILES)
$(LIBFILES): code.o
$(CC) $(LDFLAGS) -fPIC -o $@ -shared -Wl,-soname,$(patsubst %.0.1,%,$@) $^ -lc
clean:
rm -f *.a *.o *.so*
install: all
install -m 0755 -d $(DESTDIR)/usr/lib
install -m 0755 *.so* $(DESTDIR)/usr/lib
for FILE in $(SONAMES) ; do \
ln -s $${FILE}.0.1 $(DESTDIR)/usr/lib/$$FILE ; \
done
.PHONY: install clean
|