Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 777084
Collapse All | Expand All

(-)a/makefile.shared (-6 / +11 lines)
Lines 16-34 Link Here
16
16
17
PLATFORM := $(shell uname | sed -e 's/_.*//')
17
PLATFORM := $(shell uname | sed -e 's/_.*//')
18
18
19
ifeq ($(LIBTOOL),rlibtool)
20
  TGTLIBTOOL:=slibtool-shared
21
endif
22
19
ifndef LIBTOOL
23
ifndef LIBTOOL
20
  ifeq ($(PLATFORM), Darwin)
24
  ifeq ($(PLATFORM), Darwin)
21
    LIBTOOL:=glibtool
25
    LIBTOOL:=glibtool
22
  else
26
  else
23
    LIBTOOL:=libtool
27
    LIBTOOL:=libtool
24
  endif
28
  endif
29
  TGTLIBTOOL=$(LIBTOOL)
25
endif
30
endif
26
ifeq ($(PLATFORM), CYGWIN)
31
ifeq ($(PLATFORM), CYGWIN)
27
  NO_UNDEFINED:=-no-undefined
32
  NO_UNDEFINED:=-no-undefined
28
endif
33
endif
29
LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC)
34
LTCOMPILE = $(TGTLIBTOOL) --mode=compile --tag=CC $(CC)
30
INSTALL_CMD = $(LIBTOOL) --mode=install install
35
INSTALL_CMD = $(TGTLIBTOOL) --mode=install install
31
UNINSTALL_CMD = $(LIBTOOL) --mode=uninstall rm
36
UNINSTALL_CMD = $(TGTLIBTOOL) --mode=uninstall rm
32
37
33
#Output filenames for various targets.
38
#Output filenames for various targets.
34
ifndef LIBNAME
39
ifndef LIBNAME
Lines 49-63 src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c Link Here
49
LOBJECTS = $(OBJECTS:.o=.lo)
54
LOBJECTS = $(OBJECTS:.o=.lo)
50
55
51
$(LIBNAME): $(OBJECTS)
56
$(LIBNAME): $(OBJECTS)
52
	$(LIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) $(LOBJECTS) $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT) $(NO_UNDEFINED)
57
	$(TGTLIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) $(LOBJECTS) $(EXTRALIBS) -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT) $(NO_UNDEFINED)
53
58
54
test: $(call print-help,test,Builds the library and the 'test' application to run all self-tests) $(LIBNAME) $(TOBJECTS)
59
test: $(call print-help,test,Builds the library and the 'test' application to run all self-tests) $(LIBNAME) $(TOBJECTS)
55
	$(LIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
60
	$(TGTLIBTOOL) --mode=link --tag=CC $(CC) $(LTC_LDFLAGS) -o $(TEST) $(TOBJECTS) $(LIBNAME) $(EXTRALIBS)
56
61
57
# build the demos from a template
62
# build the demos from a template
58
define DEMO_template
63
define DEMO_template
59
$(1): $(call print-help,$(1),Builds the library and the '$(1)' demo) demos/$(1).o $$(LIBNAME)
64
$(1): $(call print-help,$(1),Builds the library and the '$(1)' demo) demos/$(1).o $$(LIBNAME)
60
	$$(LIBTOOL) --mode=link --tag=CC $$(CC) $$(LTC_LDFLAGS) $$^ $$(EXTRALIBS) -o $(1)
65
	$$(TGTLIBTOOL) --mode=link --tag=CC $$(CC) $$(LTC_LDFLAGS) $$^ $$(EXTRALIBS) -o $(1)
61
endef
66
endef
62
67
63
$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))
68
$(foreach demo, $(strip $(DEMOS)), $(eval $(call DEMO_template,$(demo))))

Return to bug 777084