1# Makefile for libcharset/lib 2 3#### Start of system configuration section. #### 4 5# Directories used by "make": 6srcdir = @srcdir@ 7 8# Directories used by "make install": 9prefix = @prefix@ 10local_prefix = /usr/local 11exec_prefix = @exec_prefix@ 12libdir = @libdir@ 13 14# Programs used by "make": 15CC = @CC@ 16CFLAGS = @CFLAGS@ @CFLAG_VISIBILITY@ 17CPPFLAGS = @CPPFLAGS@ 18LDFLAGS = @LDFLAGS@ 19INCLUDES = -I. -I$(srcdir) -I.. -I$(srcdir)/.. -I../include 20# -DBUILDING_LIBCHARSET: Change expansion of LIBCHARSET_DLL_EXPORTED macro. 21DEFS = -DBUILDING_LIBCHARSET @DEFS@ 22LIBTOOL = @LIBTOOL@ 23LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile 24LIBTOOL_LINK = $(LIBTOOL) --mode=link 25LIBTOOL_INSTALL = $(LIBTOOL) --mode=install 26LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall 27RM = rm -f 28 29# Programs used by "make install": 30INSTALL = @INSTALL@ 31INSTALL_DATA = @INSTALL_DATA@ 32mkinstalldirs = $(SHELL) @top_srcdir@/build-aux/mkinstalldirs 33 34#### End of system configuration section. #### 35 36PACKAGE = @PACKAGE@ 37VERSION = @VERSION@ 38 39SHELL = @SHELL@ 40 41# Before making a release, change this according to the libtool documentation, 42# section "Library interface versions". 43LIBCHARSET_VERSION_INFO = 1:0:0 44 45# Needed by $(LIBTOOL). 46top_builddir = .. 47 48SOURCES = $(srcdir)/localcharset.c $(srcdir)/relocatable-stub.c 49 50OBJECTS = localcharset.lo relocatable-stub.lo 51 52all : libcharset.la 53 54libcharset.la : $(OBJECTS) 55 $(LIBTOOL_LINK) $(CC) $(LDFLAGS) $(CFLAGS) -o libcharset.la -rpath $(libdir) -version-info $(LIBCHARSET_VERSION_INFO) -no-undefined $(OBJECTS) 56 57localcharset.lo : $(srcdir)/localcharset.c 58 $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/localcharset.c 59 60relocatable-stub.lo : $(srcdir)/relocatable-stub.c 61 $(LIBTOOL_COMPILE) $(CC) $(INCLUDES) $(CFLAGS) $(CPPFLAGS) $(DEFS) -c $(srcdir)/relocatable-stub.c 62 63# Installs the library and include files only. Typically called with only 64# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here. 65install-lib : all force 66 $(mkinstalldirs) $(libdir) 67 $(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(libdir)/libcharset.la 68 69# The following is needed in order to install a simple file in $(libdir) 70# which is shared with other installed packages. We use a list of referencing 71# packages so that "make uninstall" will remove the file if and only if it 72# is not used by another installed package. 73# On systems with glibc-2.1 or newer, the file is redundant, therefore we 74# avoid installing it. 75 76install : all force 77 $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ 78 $(LIBTOOL_INSTALL) $(INSTALL) libcharset.la $(DESTDIR)$(libdir)/libcharset.la 79 80install-strip : install 81 82installdirs : force 83 $(mkinstalldirs) $(DESTDIR)$(libdir) 84 85uninstall : force 86 $(LIBTOOL_UNINSTALL) $(RM) $(DESTDIR)$(libdir)/libcharset.la 87 88check : all 89 90mostlyclean : clean 91 92clean : force 93 $(RM) *.o *.lo *.a *.la *.o.lock core *.stackdump 94 $(RM) -r .libs _libs 95 96distclean : clean 97 $(RM) Makefile 98 99maintainer-clean : distclean 100 101# List of source files. 102SOURCE_FILES = \ 103 ChangeLog Makefile.in \ 104 relocatable-stub.c 105# List of files bidirectionally synced with gnulib. 106GNULIB_SYNCED_FILES = \ 107 localcharset.c 108# List of distributed files imported from other packages. 109IMPORTED_FILES = 110# List of distributed files generated by autotools or Makefile.devel. 111GENERATED_FILES = 112# List of distributed files generated by "make". 113DISTRIBUTED_BUILT_FILES = 114# List of distributed files. 115DISTFILES = $(SOURCE_FILES) $(GNULIB_SYNCED_FILES) $(IMPORTED_FILES) $(GENERATED_FILES) $(DISTRIBUTED_BUILT_FILES) 116 117distdir : $(DISTFILES) 118 for file in $(DISTFILES); do \ 119 if test -f $$file; then dir='.'; else dir='$(srcdir)'; fi; \ 120 cp -p "$$dir/$$file" '$(distdir)'/$$file || exit 1; \ 121 done 122 123force : 124 125