1 # This is the correct way to build a lib
4 CFLAGS=-Wall -Winline -O2
8 all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b
10 libbaz2.so: libbaz2.so.1.0
12 libbaz2.so.1.0: libbaz2.so.1.0.3b
15 # Oops, forget the soname altogether
16 libbaz1.so.1.0.3b: $(OBJS)
17 $(CC) -o $@ -shared $^ -lc
19 libbaz2.so.1.0.3b: $(OBJS:%.o=%.sho)
20 $(CC) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc
23 libbaz3.so.1.0.3b: $(OBJS)
24 $(CC) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc
27 # $(CC) $(CFLAGS) -o $@ -c $<
30 $(CC) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $<
33 $(CC) $(CFLAGS) -D_REENTRANT -o $@ -c $<
39 # The pic one in the .a (wrong), no archive table
40 libbaz1.a: $(OBJS:%.o=%.sho)
44 rm -f *.a *.o *.so* *.sho