1 # dynamic/Makefile - dynamic library Makefile
3 # This file is part of adns, which is Copyright Ian Jackson
4 # and contributors (see the file INSTALL for full details).
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software Foundation.
22 TARGETS= $(SHLIBFILE) $(SHLIBSONAME) $(SHLIBFORLINK)
23 include ../settings.make
24 include $(srcdir)/../src/adns.make
26 ALLOBJS= $(addsuffix _p.o, $(basename $(LIBOBJS)))
30 $(INSTALL_PROGRAM) $(SHLIBFILE) $(DESTDIR)$(libdir)/$(SHLIBFILE)
31 ln -sf $(SHLIBFILE) $(DESTDIR)$(libdir)/$(SHLIBSONAME)
32 ln -sf $(SHLIBSONAME) $(DESTDIR)$(libdir)/$(SHLIBFORLINK)
35 rm -f $(libdir)/$(SHLIBFILE) $(libdir)/$(SHLIBSONAME)
38 ln -s $(SHLIBSONAME) $(SHLIBFORLINK)
41 ln -s $(SHLIBFILE) $(SHLIBSONAME)
43 $(SHLIBFILE): $(ALLOBJS)
45 $(MKSHLIB_1) $@ $(MKSHLIB_2) $(ALLOBJS) $(LDLIBS) $(MKSHLIB_3)
47 %_p.o: $(srcdir)/../src/%.c $(srcdir)/../src/adns.h \
48 $(srcdir)/../src/internal.h ../src/config.h
49 $(SHLIBCC) -I. -I../src -I$(srcdir)/../src -c -o $@ $<