File: Makefile.in

package info (click to toggle)
libt3widget 1.2.0-1.1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 1,404 kB
  • sloc: cpp: 19,076; sh: 988; xml: 172; makefile: 85
file content (141 lines) | stat: -rw-r--r-- 6,446 bytes parent folder | download | duplicates (2)
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
# Copyright (C) 2011-2013,2018 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
CXXFLAGS=-O2

# Configuration flags and libraries. Include flags here to compile and link
# against the libpcre2-8, libunistring, libt3key, libt3window and libtranscript
# libraries.
# If you wish to build the X11 module, also add -DWITH_X11. See also the
# X11MODULE, X11_FLAGS and X11_LIBS variables below. Furthermore, you
# need to add either -DHAS_DLFCN and the library for dlopen/dlsym/dlclose, or
# libltdl. If GPM support is available, add -DHAS_GPM to CONFIGFLAGS and -lgpm
# to CONFIGLIBS.
CONFIGFLAGS=
CONFIGLIBS=

# Target to define for X11 integration module. Leave blank if not desired.
X11MODULE=src/libt3widget2-x11.la

# Libs and flags for the XCB library.
X11_FLAGS=
X11_LIBS=

# 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/libt3widget
includedir=$(prefix)/include
pkgconfigdir=$(libdir)/pkgconfig

SILENCELT=--silent
SILENTCXXLT=@echo '[CXXLT]' $< ;
SILENTLDLT=@echo '[LDLT]' $@ ;

OBJECTS=src/contentlist.lo src/widgets/split.lo src/colorscheme.lo src/widgets/bullet.lo src/main.lo src/dialogs/finddialog.lo src/undo.lo src/widgets/scrollbar.lo src/widgets/menuitem.lo src/dialogs/dialogbase.lo src/widgets/widgetgroup.lo src/widgets/multiwidget.lo src/textbuffer.lo src/dialogs/menupanel.lo src/widgets/button.lo src/widgets/textwindow.lo src/widgets/smartlabel.lo src/dialogs/attributepickerdialog.lo src/dialogs/dialog.lo src/dialogs/gotodialog.lo src/clipboard.lo src/dialogs/messagedialog.lo src/interfaces.lo src/log.lo src/pcre_compat.lo src/modified_xxhash.lo src/dialogs/inputselectiondialog.lo src/wrapinfo.lo src/stringmatcher.lo src/dialogs/filedialog.lo src/widgets/label.lo src/string_view.lo src/widgets/colorpicker.lo src/widgets/editwindow.lo src/key_binding.lo src/widgets/expander.lo src/widgets/widget.lo src/key.lo src/textline.lo src/widgets/checkbox.lo src/widgets/listpane.lo src/widgets/menu.lo src/widgets/frame.lo src/autocompleter.lo src/widgets/separator.lo src/mouse.lo src/util.lo src/widgets/filepane.lo src/findcontext.lo src/widgets/textfield.lo src/dialogs/popup.lo src/dialogs/insertchardialog.lo src/dialogs/mainwindow.lo src/tinystring.lo src/widgets/expandergroup.lo

all: src/libt3widget.la $(X11MODULE)

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

clean:
	rm -rf src/*.lo src/.libs src/libt3widget.la $(X11MODULE)

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

distclean: dist-clean

.cc.lo:
	$(SILENTCXXLT) $(LIBTOOL) $(SILENCELT) --mode=compile --tag=CXX $(CXX) -shared $(CXXFLAGS) $(CONFIGFLAGS) \
		$(GETTEXTFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" -Isrc -DT3_WIDGET_BUILD_DSO -D_T3_WIDGET_INTERNAL \
		-DX11_MOD_NAME=\"$(libdir)/libt3widget/libt3widget2-x11.mod\" -c -o $@ $<

src/x11.lo: src/x11.cc
	$(SILENTCXXLT) $(LIBTOOL) $(SILENCELT) --mode=compile --tag=CXX $(CXX) -shared $(CXXFLAGS) $(CONFIGFLAGS) \
		$(GETTEXTFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" -Isrc -DT3_WIDGET_BUILD_DSO -D_T3_WIDGET_INTERNAL \
		$(X11_FLAGS) -c -o $@ $<

src/libt3widget.la: $(OBJECTS)
	$(SILENTLDLT) $(LIBTOOL) $(SILENCELT) --mode=link --tag=CXX $(CXX) -shared -version-info 2:0:0 \
		$(CXXFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS) $(CONFIGLIBS) $(GETTEXTLIBS) -rpath $(libdir)

src/libt3widget2-x11.la: src/x11.lo src/libt3widget.la
	$(SILENTLDLT) $(LIBTOOL) $(SILENCELT) --mode=link --tag=CXX $(CXX) -shared -module -avoid-version \
		-shrext .mod $(CXXFLAGS) $(LDFLAGS) -o $@ src/x11.lo $(LDLIBS) $(CONFIGLIBS) $(X11_LIBS) $(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/libt3widget.la $(_libdir)
	chmod 0644 $(_libdir)/libt3widget.la
	$(INSTALL) -d $(_includedir)/t3/widget/t3widget
	$(INSTALL) -m0644 src/*.h $(_includedir)/t3/widget/t3widget
	$(INSTALL) -d $(_includedir)/t3/widget/t3widget/dialogs
	$(INSTALL) -m0644 src/dialogs/*.h $(_includedir)/t3/widget/t3widget/dialogs
	$(INSTALL) -d $(_includedir)/t3/widget/t3widget/widgets
	$(INSTALL) -m0644 src/widgets/*.h $(_includedir)/t3/widget/t3widget/widgets
	$(INSTALL) -d $(_docdir)
	$(INSTALL) -m0644 COPYING README Changelog $(_docdir)
	$(INSTALL) -d $(_pkgconfigdir)
	$(INSTALL) -m0644 libt3widget.pc $(_pkgconfigdir)
	if [ -n "$(X11MODULE)" ] ; then \
		$(INSTALL) -d $(_libdir)/libt3widget ; \
		$(LIBTOOL) --mode=install $(INSTALL) -s -m0644 src/libt3widget2-x11.la $(_libdir)/libt3widget ; \
		chmod 0644 $(_libdir)/libt3widget/libt3widget2-x11.la ; \
	fi

uninstall:
	$(LIBTOOL) --mode=uninstall rm $(_libdir)/libt3widget.la
	if [ -n "$(X11MODULE)" ] ; then \
		$(LIBTOOL) --mode=uninstall rm $(_libdir)/libt3widget/libt3widget2-x11.la ; \
		rmdir $(_libdir)/libt3widget || true ; \
	fi
	rm -rf $(_includedir)/t3/widget
	rm -rf $(_docdir)
	rm -f $(_pkgconfigdir)/libt3widget.pc

# LIBVERSION=2