File: Makefile.am

package info (click to toggle)
geany 1.22%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 17,444 kB
  • sloc: ansic: 76,211; cpp: 42,611; sh: 11,368; makefile: 650; perl: 60; python: 58; xml: 56; lisp: 48; ada: 48; fortran: 47; cs: 45; java: 41; tcl: 35; asm: 29; sql: 28; ruby: 6; php: 1
file content (124 lines) | stat: -rw-r--r-- 3,288 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
# Adapted from Pidgin's plugins/Makefile.am, thanks

EXTRA_DIST = \
	makefile.win32 \
	genapi.py

plugindir = $(libdir)/geany

plugins_includedir = $(includedir)/geany
plugins_include_HEADERS = \
	geanyplugin.h \
	geanyfunctions.h

# systems without python should continue to build OK
geanyfunctions.h: genapi.py ../src/plugins.c
	python genapi.py || true

all: geanyfunctions.h


demoplugin_la_LDFLAGS    = -module -avoid-version
classbuilder_la_LDFLAGS  = -module -avoid-version
htmlchars_la_LDFLAGS     = -module -avoid-version
export_la_LDFLAGS        = -module -avoid-version
saveactions_la_LDFLAGS   = -module -avoid-version
filebrowser_la_LDFLAGS   = -module -avoid-version
splitwindow_la_LDFLAGS   = -module -avoid-version

if PLUGINS

if MINGW
# build Geany for Windows on non-Windows systems (cross-compile)
# (this is a little hack'ish and surely can be improved)
DLL_LD_FLAGS = -module -avoid-version
MINGW_CFLAGS = \
			-DGEANY_DATADIR=\"data\" \
			-DHAVE_CONFIG_H \
			-DGTK \
			-I$(top_srcdir) \
			-I$(top_srcdir)/src \
			-I$(top_srcdir)/tagmanager/include \
			-I$(top_srcdir)/scintilla/include \
			$(GTK_CFLAGS) \
			$(PLUGIN_CFLAGS)

.PHONY: all clean

all-local: \
	classbuilder.dll \
	htmlchars.dll \
	export.dll \
	saveactions.dll \
	splitwindow.dll \
	filebrowser.dll

.c.dll:
	$(CC) $(MINGW_CFLAGS) -o $@.o -c $<
	$(CC) -shared $@.o $(GTK_LIBS) $(DLL_LD_FLAGS) -o $@

clean:
	rm -f *.o *.dll

else

# Plugins to be installed
plugin_LTLIBRARIES = \
	classbuilder.la \
	htmlchars.la \
	export.la \
	saveactions.la \
	filebrowser.la \
	splitwindow.la

# Plugins not to be installed
noinst_LTLIBRARIES = \
	demoplugin.la

demoplugin_la_SOURCES    = demoplugin.c
classbuilder_la_SOURCES  = classbuilder.c
htmlchars_la_SOURCES     = htmlchars.c
export_la_SOURCES        = export.c
saveactions_la_SOURCES   = saveactions.c
filebrowser_la_SOURCES   = filebrowser.c
splitwindow_la_SOURCES   = splitwindow.c

demoplugin_la_CFLAGS    = -DG_LOG_DOMAIN=\""Demoplugin"\"
classbuilder_la_CFLAGS  = -DG_LOG_DOMAIN=\""Classbuilder"\"
htmlchars_la_CFLAGS     = -DG_LOG_DOMAIN=\""HTMLChars"\"
export_la_CFLAGS        = -DG_LOG_DOMAIN=\""Export"\"
saveactions_la_CFLAGS   = -DG_LOG_DOMAIN=\""SaveActions"\"
filebrowser_la_CFLAGS   = -DG_LOG_DOMAIN=\""FileBrowser"\"
splitwindow_la_CFLAGS   = -DG_LOG_DOMAIN=\""SplitWindow"\"

demoplugin_la_LIBADD    = $(GTK_LIBS)
classbuilder_la_LIBADD  = $(GTK_LIBS)
htmlchars_la_LIBADD     = $(GTK_LIBS)
export_la_LIBADD        = $(GTK_LIBS)
saveactions_la_LIBADD   = $(GTK_LIBS)
filebrowser_la_LIBADD   = $(GTK_LIBS)
splitwindow_la_LIBADD   = $(GTK_LIBS)

endif # MINGW
endif # PLUGINS

AM_CPPFLAGS = \
	-DDATADIR=\"$(datadir)\" \
	-DGTK \
	-I$(top_srcdir)/src \
	-I$(top_srcdir)/tagmanager/include \
	-I$(top_srcdir)/scintilla/include \
	$(GTK_CFLAGS) \
	$(PLUGIN_CFLAGS)

#
# This part allows people to build their own plugins in here.
# Yes, it's a mess.
#
SUFFIXES = .c .so
.c.so:
	$(LIBTOOL) --mode=compile $(CC) -DHAVE_CONFIG_H -I$(top_srcdir) $(AM_CPPFLAGS) $(CFLAGS) -c $< -o tmp$@.lo $(PLUGIN_CFLAGS)
	$(LIBTOOL) --mode=link    $(CC) $(CFLAGS) -o libtmp$@.la -rpath $(plugindir) tmp$@.lo $(LIBS) $(LDFLAGS) -module -avoid-version $(PLUGIN_LIBS)
	@rm -f tmp$@.lo tmp$@.o libtmp$@.la
	@cp .libs/libtmp$@.so* $@
	@rm -f .libs/libtmp$@.*