summaryrefslogtreecommitdiff
path: root/tikzit/src/Makefile.am
blob: e869686b1dd98e9f67618d02a3e26908af12d7ea (plain)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
if WINDOWS
sharedir = ../
else
sharedir = @datarootdir@/tikzit
endif

AM_OBJCFLAGS = @FOUNDATION_OBJCFLAGS@ \
               @GTK_CFLAGS@ \
                -I common \
                -I gtk \
                -DTIKZITSHAREDIR=\"$(sharedir)\" \
                -std=c99 \
                -D_GNU_SOURCE
LIBS = @FOUNDATION_LIBS@ \
       @GTK_LIBS@
AM_YFLAGS = -d
PARSERFILES = common/tikzlexer.m common/tikzparser.m common/tikzparser.h
ICONFILES = ../draw-ellipse.png \
	    ../draw-path.png \
	    ../select-rectangular.png \
	    ../transform-crop-and-resize.png \
	    ../transform-move.png
EDGEDECFILES = ../AH_*.png ../ED_*.png

bin_PROGRAMS = tikzit
BUILT_SOURCES = $(PARSERFILES)
tikzit_SOURCES = gtk/Application.m \
                 gtk/BoundingBoxTool.m \
                 gtk/CairoRenderContext.m \
                 gtk/ColorRGB+IntegerListStorage.m \
                 gtk/ColorRGB+Gtk.m \
                 gtk/Configuration.m \
                 gtk/ContextWindow.m \
                 gtk/CreateEdgeTool.m \
                 gtk/CreateNodeTool.m \
                 gtk/Edge+Render.m \
                 gtk/EdgeStyle+Gtk.m \
                 gtk/EdgeStyle+Storage.m \
                 gtk/EdgeStyleEditor.m \
                 gtk/EdgeStyleSelector.m \
                 gtk/EdgeStylesModel.m \
                 gtk/EdgeStylesPalette.m \
                 gtk/FileChooserDialog.m \
                 gtk/HandTool.m \
                 gtk/GraphEditorPanel.m \
                 gtk/GraphRenderer.m \
                 gtk/Menu.m \
                 gtk/Node+Render.m \
                 gtk/NodeStyle+Gtk.m \
                 gtk/NodeStyle+Storage.m \
                 gtk/NodeStyleEditor.m \
                 gtk/NodeStylesModel.m \
                 gtk/NodeStyleSelector.m \
                 gtk/NodeStylesPalette.m \
                 gtk/NSError+Glib.m \
                 gtk/NSFileManager+Glib.m \
                 gtk/NSString+Glib.m \
                 gtk/PropertiesPane.m \
                 gtk/PropertyListEditor.m \
                 gtk/RecentManager.m \
                 gtk/SelectTool.m \
                 gtk/SelectionPane.m \
                 gtk/SettingsDialog.m \
                 gtk/Shape+Render.m \
                 gtk/StyleManager+Storage.m \
                 gtk/TikzDocument.m \
                 gtk/ToolBox.m \
                 gtk/WidgetSurface.m \
                 gtk/Window.m \
                 gtk/cairo_helpers.m \
                 gtk/clipboard.m \
                 gtk/gtkhelpers.m \
                 gtk/logo.m \
                 gtk/mkdtemp.m \
                 gtk/main.m \
                 gtk/tzstockitems.m \
                 gtk/tztoolpalette.m \
                 common/CircleShape.m \
                 common/ColorRGB.m \
                 common/DiamondShape.m \
                 common/Edge.m \
                 common/EdgeStyle.m \
                 common/GraphChange.m \
                 common/GraphElementData.m \
                 common/Graph.m \
                 common/Grid.m \
                 common/Node.m \
                 common/NodeStyle.m \
                 common/NSError+Tikzit.m \
                 common/NSFileManager+Utils.m \
                 common/NSString+LatexConstants.m \
                 common/NSString+Tikz.m \
                 common/PickSupport.m \
                 common/PropertyHolder.m \
                 common/GraphElementProperty.m \
                 common/RColor.m \
                 common/RectangleShape.m \
                 common/RegularPolyShape.m \
                 common/Shape.m \
                 common/StyleManager.m \
                 common/SupportDir.m \
                 common/TikzGraphAssembler.m \
                 common/TikzShape.m \
                 common/Transformer.m \
                 common/tikzparser.m \
                 common/tikzlexer.m \
                 common/util.m

if HAVE_POPPLER
tikzit_SOURCES += \
                 common/Preambles.m \
                 gtk/PreambleEditor.m \
                 gtk/Preambles+Storage.m \
                 gtk/PreviewRenderer.m \
                 gtk/PreviewWindow.m
endif

if WINDOWS
tikzit.res: tikzit.rc
	$(AM_V_GEN)windres $^ -O coff -o $@

tikzit_LDADD = tikzit.res
CLEANFILES = tikzit.res
endif

common/tikzlexer.m: common/tikzlexer.lm
	$(AM_V_GEN)$(LEX) -o $@ $^

common/tikzparser.m: common/tikzparser.ym
	$(AM_V_GEN)$(YACC) --output=$@ $^

common/tikzparser.h: common/tikzparser.m

gtk/icondata.m: $(ICONFILES)
	$(AM_V_GEN)gdk-pixbuf-csource --struct --static --raw --build-list \
		draw_ellipse ../draw-ellipse.png \
		draw_path ../draw-path.png \
		select_rectangular ../select-rectangular.png \
		transform_crop_and_resize ../transform-crop-and-resize.png \
		transform_move ../transform-move.png \
		> $@

gtk/logodata.m: ../share/icons/hicolor/*/apps/tikzit.png
	$(AM_V_GEN)gdk-pixbuf-csource --struct --static --raw --build-list \
		logo16 ../share/icons/hicolor/16x16/apps/tikzit.png \
		logo24 ../share/icons/hicolor/24x24/apps/tikzit.png \
		logo32 ../share/icons/hicolor/32x32/apps/tikzit.png \
		logo48 ../share/icons/hicolor/48x48/apps/tikzit.png \
		logo64 ../share/icons/hicolor/64x64/apps/tikzit.png \
		logo128 ../share/icons/hicolor/128x128/apps/tikzit.png \
		> $@

gtk/edgedecdata.m: $(EDGEDECFILES)
	$(AM_V_GEN)gdk-pixbuf-csource --struct --static --raw --build-list \
		AH_none_pixdata ../AH_none.png \
		AH_latex_head_pixdata ../AH_latex_head.png \
		AH_latex_tail_pixdata ../AH_latex_tail.png \
		AH_plain_head_pixdata ../AH_plain_head.png \
		AH_plain_tail_pixdata ../AH_plain_tail.png \
		ED_none_pixdata ../ED_none.png \
		ED_arrow_pixdata ../ED_arrow.png \
		ED_tick_pixdata ../ED_tick.png \
		> $@

gtk/Menu.m: gtk/icondata.m
gtk/logo.m: gtk/logodata.m
gtk/EdgeStyleEditor.m: gtk/edgedecdata.m

EXTRA_DIST = gtk/*.h common/*.h \
	     $(PARSERFILES) common/tikzlexer.lm common/tikzparser.ym \
	     $(ICONFILES) gtk/icondata.m \
	     gtk/logodata.m \
	     $(EDGEDECFILES) gtk/edgedecdata.m \
	     tikzit.rc ../tikzit.ico
MAINTAINERCLEANFILES = $(PARSERFILES) gtk/icondata.m gtk/logodata.m gtk/edgedecdata.m