Added some code to peer into a data structure in Maemian/Schedule.pm. Also added the
[maemian] / nokia-lintian / testset / libbaz / Makefile
1 # This is the correct way to build a lib
2
3 CC=gcc
4 CFLAGS=-Wall -Winline -O2
5
6 OBJS=baz.o extra.o
7
8 all: libbaz1.a libbaz2.a libbaz1.so.1.0.3b libbaz2.so libbaz3.so.1.0.3b
9
10 libbaz2.so: libbaz2.so.1.0
11         ln -sf $^ $@
12 libbaz2.so.1.0: libbaz2.so.1.0.3b
13         ln -sf $^ $@
14
15 # Oops, forget the soname altogether
16 libbaz1.so.1.0.3b: $(OBJS)
17         $(CC) -o $@ -shared $^ -lc
18
19 libbaz2.so.1.0.3b: $(OBJS:%.o=%.sho)
20         $(CC) -o $@ -shared -Wl,-soname,libbaz2.so.1.0 $^ -lc
21
22 # Non-PIC.
23 libbaz3.so.1.0.3b: $(OBJS)
24         $(CC) -o $@ -shared -Wl,-soname,libbaz3.so.1 $^ -lc
25
26 #%.o-noreentrant: %.c
27 #       $(CC) $(CFLAGS) -o $@ -c $<
28
29 %.sho: %.c
30         $(CC) $(CFLAGS) -D_REENTRANT -fPIC -o $@ -c $<
31
32 %.o: %.c
33         $(CC) $(CFLAGS) -D_REENTRANT -o $@ -c $<
34
35 libbaz2.a: $(OBJS)
36         ar cq $@ $(OBJS)
37         ranlib $@
38
39 # The pic one in the .a (wrong), no archive table
40 libbaz1.a: $(OBJS:%.o=%.sho)
41         ar cqS $@ $^
42
43 clean:
44         rm -f *.a *.o *.so* *.sho