1# Makefile for libcharset
2
3#### Start of system configuration section. ####
4
5
6# Directories used by "make":
7srcdir = .
8
9# Directories used by "make install":
10prefix = /usr
11local_prefix = /usr/local
12exec_prefix = ${prefix}
13datadir = ${prefix}/share
14libdir = ${exec_prefix}/lib
15includedir = ${prefix}/include
16mandir = ${datadir}/man
17
18# Programs used by "make":
19CP = cp
20RM = rm -f
21
22
23# Programs used by "make install":
24INSTALL = /usr/bin/install -c
25INSTALL_DATA = ${INSTALL} -m 644
26mkinstalldirs = $(SHELL) ./build-aux/mkinstalldirs
27
28#### End of system configuration section. ####
29
30SHELL = /bin/sh
31
32all : include/libcharset.h include/localcharset.h force
33	cd lib && $(MAKE) all
34
35include/libcharset.h :
36	if [ ! -d include ] ; then mkdir include ; fi
37	$(CP) $(srcdir)/include/libcharset.h.in include/libcharset.h
38
39include/localcharset.h :
40	if [ ! -d include ] ; then mkdir include ; fi
41	$(CP) $(srcdir)/include/localcharset.h.in include/localcharset.h
42
43# Installs the library and include files only. Typically called with only
44# $(libdir) and $(includedir) - don't use $(prefix) and $(exec_prefix) here.
45install-lib : all force
46	cd lib && $(MAKE) install-lib libdir='$(libdir)' includedir='$(includedir)'
47	$(mkinstalldirs) $(includedir)
48	$(INSTALL_DATA) include/libcharset.h $(includedir)/libcharset.h
49	$(INSTALL_DATA) include/localcharset.h $(includedir)/localcharset.h
50
51install : include/libcharset.h include/localcharset.h force
52	cd lib && $(MAKE) install prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
53	$(mkinstalldirs) $(DESTDIR)$(includedir)
54	$(INSTALL_DATA) include/libcharset.h $(DESTDIR)$(includedir)/libcharset.h
55	$(INSTALL_DATA) include/localcharset.h $(DESTDIR)$(includedir)/localcharset.h
56
57installdirs : force
58	cd lib && $(MAKE) installdirs prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
59	$(mkinstalldirs) $(DESTDIR)$(includedir)
60
61uninstall : force
62	cd lib && $(MAKE) uninstall prefix='$(prefix)' exec_prefix='$(exec_prefix)' libdir='$(libdir)'
63	$(RM) $(DESTDIR)$(includedir)/libcharset.h
64	$(RM) $(DESTDIR)$(includedir)/localcharset.h
65
66check : force
67	cd lib && $(MAKE) check
68
69mostlyclean : force
70	cd lib && $(MAKE) mostlyclean
71
72clean : force
73	cd lib && $(MAKE) clean
74
75distclean : force
76	cd lib && if test -f Makefile; then $(MAKE) distclean; fi
77	$(RM) include/libcharset.h include/localcharset.h
78	$(RM) config.status config.log config.cache Makefile config.h libtool
79
80maintainer-clean : force
81	cd lib && if test -f Makefile; then $(MAKE) maintainer-clean; fi
82	$(RM) include/libcharset.h include/localcharset.h
83	$(RM) config.status config.log config.cache Makefile config.h libtool
84
85force :
86
87