Debian Codegraph @

debian/patches/fix-makefile

raw
1 --- a/GNUmakefile
2 +++ b/GNUmakefile
3 @@ -6,7 +6,8 @@
4 LDCONFIG ?= /sbin/ldconfig
5
6 # Some suggestions: (-mcpu= generates i386 compatible code)
7 -CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w
8 +CFLAGS ?= -O2 -pipe -Wall -Werror
9 +CFLAGS += -fPIC
10 #CFLAGS = -O2 -fomit-frame-pointer -pipe -march=i586 -Wall -g
11 #CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i586 -Wall -ansi -pedantic
12 #CFLAGS = -O6 -fomit-frame-pointer -pipe -march=i686 -Wall -ansi -pedantic
13 @@ -34,20 +35,21 @@
14 $(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
15
16 $(LIBRARY): avl.o
17 - $(CC) -nostdlib -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
18 + $(CC) $(LDFLAGS) -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
19
20 clean:
21 $(RM) *.o $(PROGRAMS) libavl.*
22
23 install: all
24 $(INSTALL) -d $(DESTDIR)$(libdir)
25 - $(INSTALL) avl.h $(DESTDIR)$(includedir)
26 - $(INSTALL) $(LIBRARIES) $(DESTDIR)$(libdir)
27 - for i in $(LIBRARIES); do\
28 + $(INSTALL) -d $(DESTDIR)$(includedir)
29 + $(INSTALL) -m 644 avl.h $(DESTDIR)$(includedir)
30 + $(INSTALL) -m 644 $(LIBRARY) $(DESTDIR)$(libdir)
31 + for i in $(LIBRARY); do\
32 $(LN) -sf $$i $(DESTDIR)$(libdir)/$${i%.*};\
33 $(LN) -sf $${i%.*} $(DESTDIR)$(libdir)/$${i%.*.*};\
34 done
35 - -$(LDCONFIG)
36 + #-$(LDCONFIG)
37
38 .PHONY: clean install all
39 .PRECIOUS: %.h %.c