60 |
|
|
61 |
# Unfortunately, in order to test libtool thoroughly, we need access |
# Unfortunately, in order to test libtool thoroughly, we need access |
62 |
# to its private directory. |
# to its private directory. |
63 |
objdir = `sed -n -e 's/^objdir=\(.*\)$$/\1/p' ../libtool` |
objdir = `$(LIBTOOL) --config | sed -n -e 's/^objdir=\(.*\)$$/\1/p'` |
64 |
|
|
65 |
# The following rules are only for the libtool demo and tests. |
# The following rules are only for the libtool demo and tests. |
66 |
# Regenerate our acinclude.m4 only if it doesn't exist. |
# Regenerate our acinclude.m4 only if it doesn't exist. |
72 |
# Test programs to see what gets hardcoded. |
# Test programs to see what gets hardcoded. |
73 |
.PHONY: hardcode |
.PHONY: hardcode |
74 |
hardcode: $(hardcode_tests) |
hardcode: $(hardcode_tests) |
75 |
|
SET_HARDCODE_FLAGS = eval `$(LIBTOOL) --config | egrep -e '^(hardcode_.*|wl)='` |
76 |
hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la |
hc-direct: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la |
77 |
@rm -f hc-direct |
@rm -f hc-direct |
78 |
@echo "You may ignore any linking errors from the following command:" |
@echo "You may ignore any linking errors from the following command:" |
81 |
for lib in $$library_names; do \ |
for lib in $$library_names; do \ |
82 |
shlib="./$(objdir)/$$lib"; \ |
shlib="./$(objdir)/$$lib"; \ |
83 |
done; \ |
done; \ |
84 |
eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \ |
$(SET_HARDCODE_FLAGS); \ |
85 |
libdir=$(libdir); \ |
libdir=$(libdir); \ |
86 |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
87 |
echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ |
echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ |
88 |
eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@" |
eval "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) $$shlib $(LIBS) $(LIBM) $$flag || echo unsupported > $@" |
89 |
|
|
90 |
hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la |
hc-libflag: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la |
91 |
@eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \ |
@$(SET_HARDCODE_FLAGS); \ |
92 |
libdir=`pwd`/$(objdir); \ |
libdir=`pwd`/$(objdir); \ |
93 |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
94 |
if test -z "$$flag"; then \ |
if test -z "$$flag"; then \ |
103 |
hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la |
hc-libpath: $(hell_OBJECTS) $(hell_DEPENDENCIES) $(libdir)/libhello.la |
104 |
@rm -f hc-libpath |
@rm -f hc-libpath |
105 |
@echo "You may ignore any linking errors from the following command:" |
@echo "You may ignore any linking errors from the following command:" |
106 |
@eval `egrep -e '^(shlibpath_var|hardcode_.*|wl)=' libtool`; \ |
@$(SET_HARDCODE_FLAGS); \ |
107 |
|
eval `$(LIBTOOL) --config | grep '^shlibpath_var='`; \ |
108 |
libdir=$(libdir); \ |
libdir=$(libdir); \ |
109 |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
110 |
echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ |
echo "$$shlibpath_var=./$(objdir) $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ |
112 |
|
|
113 |
hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES) |
hc-minusL: $(hell_OBJECTS) $(hell_DEPENDENCIES) |
114 |
@rm -f hc-minusL |
@rm -f hc-minusL |
115 |
@eval `egrep -e '^(hardcode_.*|wl)=' libtool`; \ |
@$(SET_HARDCODE_FLAGS); \ |
116 |
libdir=$(libdir); \ |
libdir=$(libdir); \ |
117 |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
flag=`eval echo \"$$hardcode_libdir_flag_spec\"`; \ |
118 |
echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ |
echo "$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(hell_OBJECTS) -L./$(objdir) -lhello $(LIBS) $(LIBM) $$flag || echo unsupported > $@"; \ |