1
# Copyright (c) 2002 Jorge Acereda <jacereda@users.sourceforge.net> &
2
# Peter O'Gorman <ogorman@users.sourceforge.net>
4
# Portions may be copyright others, see the AUTHORS file included with this
6
# Maintained by Peter O'Gorman <ogorman@users.sourceforge.net>
8
# Bug Reports and other queries should go to <ogorman@users.sourceforge.net>
12
# Permission is hereby granted, free of charge, to any person obtaining
13
# a copy of this software and associated documentation files (the
14
# "Software"), to deal in the Software without restriction, including
15
# without limitation the rights to use, copy, modify, merge, publish,
16
# distribute, sublicense, and/or sell copies of the Software, and to
17
# permit persons to whom the Software is furnished to do so, subject to
18
# the following conditions:
20
# The above copyright notice and this permission notice shall be
21
# included in all copies or substantial portions of the Software.
23
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
27
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
28
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
29
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32
exec_prefix = @exec_prefix@
34
includedir = @includedir@
40
CFLAGS=-Wall -Wstrict-prototypes -Wmissing-prototypes $(OPT)
43
INSTALL=/usr/bin/install
47
DEFINES=@DEBUGDEF@ @FINKDEF@
49
NOTPREPEND=@NOTPREPEND@
67
test/Makefile test/dltest.c test/dlmodule.c test/dladdr.c
71
all: libdl.a libdl.dylib dlopen.3
73
configure: configure.in
77
tar -cvf dlcompat-$(VERSION).tar $(DISTFILES)
78
if test -d dlcompat-$(VERSION); then rm -rf dlcompat-$(VERSION); fi;
79
mkdir dlcompat-$(VERSION)
80
tar -C dlcompat-$(VERSION) -xvf dlcompat-$(VERSION).tar
81
rm dlcompat-$(VERSION).tar
82
tar -cvzf dlcompat-$(VERSION).tar.gz dlcompat-$(VERSION)
83
rm -rf dlcompat-$(VERSION)
86
$(INSTALL) -d -m 755 $(DESTDIR)/$(libdir)/
87
$(INSTALL) -m 644 libdl.a $(DESTDIR)/$(libdir)/
88
$(INSTALL) -m 644 libdl.$(LIBVER).dylib $(DESTDIR)/$(libdir)/
89
ln -fs libdl.$(LIBVER).dylib $(DESTDIR)/$(libdir)/libdl.dylib
90
$(INSTALL) -d -m 755 $(DESTDIR)/$(includedir)/
91
$(INSTALL) -m 644 dlfcn.h $(DESTDIR)/$(includedir)/
94
sed -e "s/%%NOTPREPEND%%/$(NOTPREPEND)/" < dlopen.3.in > dlopen.3
97
$(INSTALL) -d -m 755 $(DESTDIR)/$(mandir)/man3/
98
$(INSTALL) -m 644 dlopen.3 $(DESTDIR)/$(mandir)/man3/dlopen.3
99
$(INSTALL) -m 644 dladdr.3 $(DESTDIR)/$(mandir)/man3/dladdr.3
100
ln -fs dlopen.3 $(DESTDIR)/$(mandir)/man3/dlsym.3
101
ln -fs dlopen.3 $(DESTDIR)/$(mandir)/man3/dlclose.3
102
ln -fs dlopen.3 $(DESTDIR)/$(mandir)/man3/dlerror.3
105
$(CC) $(CFLAGS) $(DEFINES) -o $@ -c $<
108
$(AR) libdl.a $(OBJS)
111
libdl.dylib: libdl.$(LIBVER).dylib
112
ln -sf libdl.$(LIBVER).dylib $@
114
libdl.$(LIBVER).dylib: $(OBJS)
115
$(CC) -dynamiclib -o $@ $(OBJS) -install_name $(prefix)/lib/$@ $(VERSTRING)
118
rm -f $(OBJS) libdl.* *~ *.o dlopen.3