Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 313673 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-17 / +27 lines)
Line  Link Here
- fixing CFLAGS, LDFLAGS, CC
- fixing CFLAGS, LDFLAGS, CC
1
- fixing parallel build
1
- fixing parallel build
2
- fixing as-needed issues
2
- fixing as-needed issues
3
- making static libs optional
3
- making static libs optional
4
- introducing make DESTDIR compatibility
4
- introducing make DESTDIR compatibility
5
- removing Makefile.PLATFORM bits, as they violate sandbox
5
- removing Makefile.PLATFORM bits, as they violate sandbox
6
-- Makefile
6
++ Makefile
Lines 1-13 Link Here
1
# Makefile for libmba
1
# Makefile for libmba
2
# Supported flags: -DVARRAY_INIT_SIZE=N -DUSE_WCHAR
2
# Supported flags: -DVARRAY_INIT_SIZE=N -DUSE_WCHAR
3
3
4
MFLAGS     = -g -W1 -Isrc
4
MFLAGS     = -Isrc
5
MKTOOL     = ./mktool
5
MKTOOL     = ./mktool
6
6
7
prefix     = /usr/local
7
prefix     = $(DESTDIR)/usr
8
includedir = $(prefix)/include
8
includedir = $(prefix)/include
9
libdir     = $(prefix)/lib
9
libdir     = $(prefix)/lib
10
mandir     = $(prefix)/man
10
mandir     = $(prefix)/share/man
11
LIBNAME    = mba
11
LIBNAME    = mba
12
LIBVERS    = 0.9.1
12
LIBVERS    = 0.9.1
13
ARNAME     = lib$(LIBNAME).a
13
ARNAME     = lib$(LIBNAME).a
Lines 19-57 Link Here
19
MAN        = diff.3m bitset.3m allocator.3m cfg.3m pool.3m varray.3m csv.3m text.3m path.3m suba.3m msgno.3m stack.3m linkedlist.3m hashmap.3m hexdump.3m shellout.3m eval.3m svsem.3m svcond.3m time.3m
19
MAN        = diff.3m bitset.3m allocator.3m cfg.3m pool.3m varray.3m csv.3m text.3m path.3m suba.3m msgno.3m stack.3m linkedlist.3m hashmap.3m hexdump.3m shellout.3m eval.3m svsem.3m svcond.3m time.3m
20
MANGZ      = $(MAN:.3m=.3m.gz)
20
MANGZ      = $(MAN:.3m=.3m.gz)
21
21
22
.PHONY: all clean install uninstall install-ar uninstall-ar
22
.SUFFIXES: .pic.o .3m .3m.gz
23
.SUFFIXES: .pic.o .3m .3m.gz
23
24
24
all: mktool so ar
25
ifeq ($(STATIC),1)
26
all: $(MKTOOL) so ar
27
install-ar: $(ARNAME)
28
	-$(MKTOOL) -i $(ARNAME) $(libdir)
29
uninstall-ar:
30
	$(MKTOOL) -u $(ARNAME) $(libdir)
31
else
32
all: $(MKTOOL) so
33
install-ar:
34
uninstall-ar:
35
endif
25
36
26
mktool:
37
$(MKTOOL): mktool.c
27
	$(CC) -g -o mktool mktool.c
38
	$(CC) -g -o mktool mktool.c
28
39
29
ar: mktool $(OBJS)
40
$(PICOBJS): $(MKTOOL)
41
$(OBJS): $(MKTOOL)
42
43
ar: $(OBJS)
30
	ar $(ARFLAGS) $(ARNAME) $(OBJS)
44
	ar $(ARFLAGS) $(ARNAME) $(OBJS)
31
	ranlib $(ARNAME)
45
	ranlib $(ARNAME)
32
so: mktool $(PICOBJS)
46
so: $(PICOBJS)
33
	@$(MKTOOL) -l -v -libname $(LIBNAME) -libvers $(LIBVERS) -shared -soname -lutil $(PICOBJS)
47
	@$(MKTOOL) -l -v -libname $(LIBNAME) -libvers $(LIBVERS) -shared -soname $(LDFLAGS) $(PICOBJS) -lutil
34
48
35
.c.pic.o:
49
.c.pic.o:
36
	@$(MKTOOL) -c -v $(MFLAGS) -fpic -c -o $*.pic.o $<
50
	@$(MKTOOL) -c -v $(CFLAGS) $(MFLAGS) -fpic -c -o $*.pic.o $<
37
.c.o:
51
.c.o:
38
	@$(MKTOOL) -c -v $(MFLAGS) -c -o $*.o $<
52
	@$(MKTOOL) -c -v $(CFLAGS) $(MFLAGS) -c -o $*.o $<
39
53
40
install: mktool
54
install: install-ar
41
	-$(MKTOOL) -i $(ARNAME) $(libdir)
42
	-$(MKTOOL) -i -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir)
55
	-$(MKTOOL) -i -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir)
43
	$(MKTOOL) -i $(HDRS) $(includedir)/mba
56
	$(MKTOOL) -i $(HDRS) $(includedir)/mba
44
	$(MKTOOL) -i docs/man/*.3m.gz $(mandir)/man3
57
	$(MKTOOL) -i docs/man/*.3m.gz $(mandir)/man3
45
	@-libdir=$(libdir) mandir="$(mandir)" MAN="$(MAN)" MANGZ="$(MANGZ)" $(MKTOOL) -m -v platform_specific_install
46
	@echo
58
	@echo
47
	@echo installation successful
59
	@echo installation successful
48
uninstall: mktool
60
uninstall: uninstall-ar
49
	$(MKTOOL) -u $(ARNAME) $(libdir)
50
	$(MKTOOL) -u -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir)
61
	$(MKTOOL) -u -libname $(LIBNAME) -libvers $(LIBVERS) $(libdir)
51
	$(MKTOOL) -u $(HDRS) $(includedir)/mba
62
	$(MKTOOL) -u $(HDRS) $(includedir)/mba
52
	rm -rf $(includedir)/mba
63
	rm -rf $(includedir)/mba
53
	$(MKTOOL) -u $(MANGZ) $(mandir)/man3
64
	$(MKTOOL) -u $(MANGZ) $(mandir)/man3
54
	-@libdir=$(libdir) mandir="$(mandir)" MAN="$(MAN)" MANGZ="$(MANGZ)" $(MKTOOL) -m -v platform_specific_uninstall
55
	@echo
65
	@echo
56
	@echo de-installation successful
66
	@echo de-installation successful
57
67

Return to bug 313673