-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
executable file
·148 lines (99 loc) · 4.59 KB
/
Makefile.am
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
142
143
144
145
146
bin_PROGRAMS = X11workbench
X11workbench_SOURCES = X11workbench.c X11workbench.h main_frame.c main_frame.h refactor.c refactor.h
X11workbench_SOURCES += gizzard.c gizzard.h gdb_helper.c gdb_helper.h resource_edit.c resource_edit.h
X11workbench_SOURCES += context_help.c context_help.h
X11workbench_SOURCES += application_icon.xpm splash.xpm textfiledoc.xpm newdoc.xpm clangdoc.xpm makefiledoc.xpm
X11workbench_SOURCES += doxy_comments.dox doxy.txt doxy_footer.html doxy_header.html doxy_stylesheet.css
X11workbench_DEPENDENCIES = toolkit_lib
TOOLKIT_DOCDEPENDS = doxy.txt doxy_comments.dox doxy_footer.html doxy_header.html doxy_stylesheet.css
if HAVE_DOXYGEN
X11workbench_DEPENDENCIES += toolkit_doc
endif
# allow multiple simultaneous jobs to speed up automake process
AUTOMAKE_JOBS = 4
# This next thing is needed for conf_help.h so it doesn't gripe at me
# NOTE: GLOBAL_XPATH and GLOBAL_PATH need the embedded escaped quotes
AM_CPPFLAGS = $(X_CFLAGS) -DGLOBAL_XPATH="\"$(GLOBAL_XPATH)/etc\"" -DGLOBAL_PATH="\"$(sysconfdir)\""
# this allows me to eliminate a few files, like README Since I have included
# 'README.md' in EXTRA_DIST (see below), I'll get THAT one and any others
# that are present. But automake won't ENFORCE them.
AUTOMAKE_OPTIONS = foreign
# presence of libXpm library. use --enable-libXpm in configure to enable it
if HAVE_XPM_LIB
X_EXTRA_LIBS += -lXpm
endif
# presence of libXft library. use --disble-libXft in configure to disable it
if HAVE_XFT_LIB
X_EXTRA_LIBS += $(FT2_LIBS) -lXft
# X_EXTRA_LIBS += -lXft
endif
# presence of libXext library. use --disble-libXext in configure to disable it
if HAVE_XEXT_LIB
X_EXTRA_LIBS += -lXext
endif
# note: was using AM_LDFLAGS but Ubuntu build borked, so using LIBS instead
#AM_LDFLAGS = $(X_LIBS) -lm -lX11 $(X_PRE_LIBS) $(X_EXTRA_LIBS)
LDADD=./lib/libX11workbenchToolkit.a
LIBS = -L./lib -lX11workbenchToolkit $(X_LIBS) -lm -lX11 $(X_PRE_LIBS) $(X_EXTRA_LIBS)
# any additional libraries go here
LIBS += -lpthread -lm
if NEED_LRT
LIBS += -lrt
endif
if NEED_LDL
LIBS += -ldl
endif
# MAN pages
man1_MANS = @MAN_PAGES@
# Extra distribution files
EXTRA_DIST = README.md BUILD X11workbench.1 X11workbench.interix $(man1_MANS)
if NO_OPT
NO_OPT_FLAGS = -O0
else
NO_OPT_FLAGS =
endif
# cygwin does not support cetain compiler warnings
if NOT_CYGWIN
EXTRA_WARN_FLAGS= -Waddress -Wpointer-sign \
-Wstrict-overflow=1 -Wvolatile-register-var
else
EXTRA_WARN_FLAGS=
endif
AM_CFLAGS = $(NO_OPT_FLAGS) -DX11WORKBENCH_PROJECT_BUILD
if NO_DEBUG
AM_CFLAGS += -DNO_DEBUG -Wall -fno-strict-aliasing
if FATAL_WARN
AM_CFLAGS += -Werror
endif
else
AM_CFLAGS += $(EXTRA_WARN_FLAGS) -Wimplicit-int \
-Wimplicit-function-declaration -Wmissing-braces \
-Wnonnull -Wparentheses -Wreturn-type \
-Wsequence-point -Wswitch -Wtrigraphs \
-Wuninitialized -Wunknown-pragmas -Wunused-label \
-fno-strict-aliasing
endif
# subdirectories containing additional sources
SUBDIRS = lib
# pseudo target for building the library
.PHONY: toolkit_lib
lib/libX11workbenchToolkit.a: toolkit_lib
toolkit_lib:
$(MAKE) -j $(NUM_CORES) -C lib libX11workbenchToolkit.a
# pseudo target for building documentation
libX11workbenchToolkit_DOCDEPEND = lib/pixmap_helper.c lib/window_helper.c lib/font_helper.c lib/font_legacy.c
libX11workbenchToolkit_DOCDEPEND += lib/edit_window.c lib/child_frame.c lib/frame_window.c lib/dialog_window.c
libX11workbenchToolkit_DOCDEPEND += lib/dialog_impl.c lib/dialog_controls.c lib/dialog_support.c lib/graphical_api.c
libX11workbenchToolkit_DOCDEPEND += lib/menu.c lib/menu_bar.c lib/menu_popup.c lib/conf_help.c lib/file_help.c lib/draw_text.c
libX11workbenchToolkit_DOCDEPEND += lib/window_dressing.c lib/platform_helper.c lib/text_object.c lib/clipboard_helper.c
libX11workbenchToolkit_DOCDEPEND += include/pixmap_helper.h include/edit_window.h include/child_frame.h
libX11workbenchToolkit_DOCDEPEND += include/window_helper.h include/font_helper.h include/frame_window.h
libX11workbenchToolkit_DOCDEPEND += include/dialog_window.h include/dialog_controls.h include/dialog_support.h
libX11workbenchToolkit_DOCDEPEND += include/menu.h include/menu_bar.h include/menu_popup.h include/conf_help.h
libX11workbenchToolkit_DOCDEPEND += include/file_help.h include/draw_text.h include/window_dressing.h
libX11workbenchToolkit_DOCDEPEND += include/platform_helper.h include/text_object.h include/debug_helper.h
.PHONY: toolkit_doc
toolkit_doc: toolkit_doc.log
toolkit_doc.log: $(TOOLKIT_DOCDEPENDS) Makefile $(libX11workbenchToolkit_DOCDEPEND)
@echo Building documentation using doxygen. see toolkit_doc.log for output
@doxygen doxy.txt >toolkit_doc.log 2>&1