File: Makefile.in

package info (click to toggle)
libt3config 0.2.11-1
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 524 kB
  • sloc: ansic: 3,753; sh: 828; xml: 172; lex: 87; makefile: 56
file content (108 lines) | stat: -rw-r--r-- 4,038 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# Copyright (C) 2011-2012 G.P. Halkes
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3, as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
.POSIX:

# C-compiler flags
CFLAGS=-O2

# Configuration flags. Remove -DHAS_STRDUP if your system does not provide
# the strdup function. If your system does not provide the
# newlocale/uselocale/freelocale set of functions, remove -DHAS_USELOCALE. If
# your system does provide the *locale set of functions, but requires the
# xlocale.h header file instead of the locale.h header file, add
# -DUSE_XLOCALE_H.
# If your environment does not provide all the required functions for the XDG
# support functions (see the README for a list), add -DNO_XDG
CONFIGFLAGS=-DHAS_STRDUP -DHAS_USELOCALE

# Gettext configuration
# GETTEXTFLAGS should contain -DUSE_GETTEXT to enable gettext translations
# GETTEXTLIBS should contain all link flags to allow linking with gettext, if
# it has been enabled. The GNU libc already contains the gettext library, so
# there is no need to add any flags. Otherwise, -lintl is usually required, and
# sometimes -liconv as well.
# LOCALEDIR: the directory where the locale dependant files should be installed.
# LINGUAS: translations to be installed. Look in po directory for available
#  translations.
GETTEXTFLAGS=
GETTEXTLIBS=
LOCALEDIR=$(prefix)/share/locale
LINGUAS=

# The libtool executable
LIBTOOL=libtool

# Installation prefix
prefix=/usr/local

# Install program to use (should be BSD install compatible)
INSTALL=install

# Miscelaneous install paths
libdir=$(prefix)/lib
docdir=$(prefix)/share/doc/libt3config
includedir=$(prefix)/include
pkgconfigdir=$(libdir)/pkgconfig

SILENCELT=--silent
SILENTCCLT=@echo '[CCLT]' $< ;
SILENTLDLT=@echo '[LDLT]' $@ ;

OBJECTS=src/xdg.lo src/write.lo src/pathsearch.lo src/parser.lo src/lex.lo src/schema.lo src/config.lo src/util.lo src/expression.lo src/config_shared.lo

all: src/libt3config.la

.PHONY: all clean dist-clean distclean install uninstall
.SUFFIXES: .c .o .lo .la .mo .po
.IGNORE: uninstall

clean:
	rm -rf src/*.lo src/generated/*.lo src/.libs src/generated/.libs src/libt3config.la

dist-clean: clean
	rm -rf Makefile config.log libt3config.pc .Makefile* .config*

distclean: dist-clean

.c.lo:
	$(SILENTCCLT) $(LIBTOOL) $(SILENCELT) --mode=compile --tag=CC $(CC) -shared $(CFLAGS) $(CONFIGFLAGS) $(GETTEXTFLAGS) -Isrc -DT3_CONFIG_BUILD_DSO -c -o $@ $<

src/libt3config.la: $(OBJECTS)
	$(SILENTLDLT) $(LIBTOOL) $(SILENCELT) --mode=link --tag=CC $(CC) -shared -version-info 0:1:0 $(CFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS) $(GETTEXTLIBS) -rpath $(libdir)

# Macros to make DESTDIR support more readable
_libdir=$(DESTDIR)$(libdir)
_docdir=$(DESTDIR)$(docdir)
_includedir=$(DESTDIR)$(includedir)
_pkgconfigdir=$(DESTDIR)$(pkgconfigdir)
_LOCALEDIR=$(DESTDIR)$(LOCALEDIR)

install: all
	$(INSTALL) -d $(_libdir)
	$(LIBTOOL) --mode=install $(INSTALL) -s -m0644 src/libt3config.la $(_libdir)
	chmod 0644 $(_libdir)/libt3config.la
	$(INSTALL) -d $(_includedir)/t3/config/t3config
	$(INSTALL) -m0644 src/config.h src/config_api.h src/config_errors.h $(_includedir)/t3/config/t3config
	$(INSTALL) -d $(_docdir)/API/search
	( cd doc ; find API -type f ) | while read X ; do $(INSTALL) -m0644 doc/$${X} $(_docdir)/$${X} ; done
	$(INSTALL) -m0644 COPYING README Changelog $(_docdir)
	$(INSTALL) -d $(_pkgconfigdir)
	$(INSTALL) -m0644 libt3config.pc $(_pkgconfigdir)

uninstall:
	$(LIBTOOL) --mode=uninstall rm $(_libdir)/libt3config.la
	rm -rf $(_includedir)/t3/config
	rm -rf $(_docdir)
	rm -f $(_pkgconfigdir)/libt3config.pc

# LIBVERSION=0