Debian Codegraph @

GNUmakefile

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 # You may select DEPTHs (no indexing), COUNTs (slower) or both (more memory).
2 #CPPFLAGS += -DAVL_COUNT -DAVL_DEPTH
3
4 LN ?= ln
5 INSTALL ?= /usr/bin/install
6 LDCONFIG ?= /sbin/ldconfig
7
8 # Some suggestions: (-mcpu= generates i386 compatible code)
9 CFLAGS ?= -O2 -fomit-frame-pointer -pipe -mcpu=i686 -w
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 #CFLAGS = -O6 -march=k6 -fforce-mem -fforce-addr -pipe
14 #CFLAGS = -g -fomit-frame-pointer -pipe -march=i686 -Wall -ansi -pedantic
15 #CFLAGS = -g -pg -a -pipe -march=i686 -Wall
16 #LDFLAGS = -s
17
18 prefix ?= /usr/local
19 libdir ?= $(prefix)/lib
20 includedir ?= $(prefix)/include
21 includedir ?= /usr/include
22
23 PROGRAMS = avlsort setdiff
24 LIBRARY = libavl.so.1.5
25
26 all: $(LIBRARY)
27
28 test: $(PROGRAMS)
29
30 setdiff: setdiff.o avl.o
31 $(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
32
33 avlsort: avlsort.o avl.o
34 $(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
35
36 $(LIBRARY): avl.o
37 $(CC) -nostdlib -shared -Wl,-soname,libavl.so.1 $^ -o $@ -lc
38
39 clean:
40 $(RM) *.o $(PROGRAMS) libavl.*
41
42 install: all
43 $(INSTALL) -d $(DESTDIR)$(libdir)
44 $(INSTALL) avl.h $(DESTDIR)$(includedir)
45 $(INSTALL) $(LIBRARIES) $(DESTDIR)$(libdir)
46 for i in $(LIBRARIES); do\
47 $(LN) -sf $$i $(DESTDIR)$(libdir)/$${i%.*};\
48 $(LN) -sf $${i%.*} $(DESTDIR)$(libdir)/$${i%.*.*};\
49 done
50 -$(LDCONFIG)
51
52 .PHONY: clean install all
53 .PRECIOUS: %.h %.c