Move internationalization macros to one header
[geda-pcb/gde.git] / src / Makefile.am
blobe7192683eb530b84f80cc2e540973d8bd9dc21ea
1 ## -*- makefile -*-
2 ## $Id$
3 ##
5 SUBDIRS=        icons
7 pcbtreedir=     @PCBTREEDIR@
8 pcblibdir=      @PCBLIBDIR@
10 AUTOMAKE_OPTIONS = subdir-objects
11 HIDLIST = @HIDLIST@
12 noinst_LIBRARIES = @HIDLIBS@
13 EXTRA_LIBRARIES = \
14         libgtk.a liblesstif.a libbatch.a \
15         liblpr.a libgerber.a libbom.a libpng.a libps.a libnelma.a libgts.a \
16         libgcode.a
18 pcblib_DATA=    \
19         default_font \
20         gpcb-menu.res \
21         pcb-menu.res
23 bin_PROGRAMS=   pcb
25 if DEBUG_BUILD
26 # don't disable assert()
27 else
28 AM_CFLAGS = -DNDEBUG
29 endif
31 PCB_SRCS = \
32         action.c \
33         action.h \
34         autoplace.c \
35         autoplace.h \
36         autoroute.c \
37         autoroute.h \
38         box.h \
39         buffer.c \
40         buffer.h \
41         change.c \
42         change.h \
43         clip.c \
44         clip.h \
45         command.c \
46         command.h \
47         compat.c \
48         compat.h \
49         const.h \
50         copy.c \
51         copy.h \
52         create.c \
53         create.h \
54         crosshair.c \
55         crosshair.h \
56         data.c \
57         data.h \
58         djopt.c \
59         djopt.h \
60         dolists.h \
61         draw.c \
62         draw.h \
63         drill.c \
64         drill.h \
65         edif.y \
66         edif_parse.h \
67         error.c \
68         error.h \
69         file.c \
70         file.h \
71         find.c \
72         find.h \
73         flags.c \
74         fontmode.c \
75         global.h \
76         heap.c \
77         heap.h \
78         hid.h \
79         insert.c \
80         insert.h \
81         intersect.c \
82         intersect.h \
83         line.c \
84         line.h \
85         lrealpath.c \
86         lrealpath.h \
87         macro.h \
88         main.c \
89         mirror.c \
90         mirror.h \
91         misc.c \
92         misc.h \
93         move.c \
94         move.h \
95         mtspace.c \
96         mtspace.h \
97         mymem.c \
98         mymem.h \
99         netlist.c \
100         parse_l.h \
101         parse_l.l \
102         parse_y.h \
103         parse_y.y \
104         polygon.c \
105         polygon.h \
106         polygon1.c \
107         polyarea.h \
108         puller.c \
109         print.c \
110         print.h \
111         rats.c \
112         rats.h \
113         remove.c \
114         remove.h \
115         report.c \
116         report.h \
117         res_parse.y \
118         res_lex.l \
119         resource.h \
120         rotate.c \
121         rotate.h \
122         rtree.c \
123         rtree.h \
124         rubberband.c \
125         rubberband.h \
126         search.c \
127         search.h \
128         select.c \
129         select.h \
130         set.c \
131         set.h \
132         strflags.c \
133         strflags.h \
134         thermal.c \
135         thermal.h \
136         undo.c \
137         undo.h \
138         vector.c \
139         vector.h \
140         vendor.c \
141         vendor.h \
142         hid/common/actions.c \
143         hid/common/flags.c \
144         hid/common/hidinit.c \
145         hid/common/hidnogui.c \
146         hid/common/extents.c \
147         hid/common/draw_helpers.c \
148         hid/common/draw_helpers.h \
149         hid/common/hid_resource.c \
150         hid/common/hid_resource.h \
151         hid/hidint.h 
153 EXTRA_pcb_SOURCES = ${DBUS_SRCS} toporouter.c toporouter.h
154 DBUS_SRCS= \
155         dbus-pcbmain.c \
156         dbus-pcbmain.h \
157         dbus.h \
158         dbus.c
160 BUILT_SOURCES = \
161         core_lists.h \
162         gpcb-menu.h \
163         hid/gtk/gtk_lists.h \
164         hid/lesstif/lesstif_lists.h \
165         hid/batch/batch_lists.h \
166         hid/png/png_lists.h \
167         hid/gcode/gcode_lists.h \
168         hid/nelma/nelma_lists.h \
169         hid/ps/ps_lists.h \
170         parse_y.h \
171         pcb-menu.h \
172         res_parse.h \
173         hid/common/hidlist.h
175 pcb_LDADD = @HIDLIBS@
176 pcb_DEPENDENCIES = @HIDLIBS@
178 if WITH_TOPOROUTER
179 PCB_SRCS += toporouter.c toporouter.h
180 noinst_LIBRARIES += libgts.a
181 pcb_LDADD += libgts.a
182 pcb_DEPENDENCIES += libgts.a
183 endif
185 pcb_SOURCES = ${PCB_SRCS} core_lists.h
187 # Action, Attribute, and Flag lists.
188 core_lists.h : ${PCB_SRCS} Makefile
189         true > $@
190         (for f in ${PCB_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
191         mv $@.tmp $@
193 # for globalconst.h
194 INCLUDES=       -I$(top_srcdir) -I$(srcdir)/icons -I$(srcdir)/gts
196 DEFS=   -DLOCALEDIR=\"$(localedir)\" @DEFS@
198 EXTRA_DIST= \
199         check_icon.data \
200         default_font \
201         $(srcdir)/hid/batch/hid.conf \
202         $(srcdir)/hid/bom/hid.conf \
203         $(srcdir)/hid/gcode/hid.conf \
204         $(srcdir)/hid/gerber/hid.conf \
205         $(srcdir)/hid/gtk/gui-icons-misc.data \
206         $(srcdir)/hid/gtk/gui-icons-mode-buttons.data \
207         $(srcdir)/hid/gtk/hid.conf \
208         $(srcdir)/hid/gtk/pcb.rc \
209         $(srcdir)/hid/lesstif/hid.conf \
210         $(srcdir)/hid/lpr/hid.conf \
211         $(srcdir)/hid/png/hid.conf \
212         $(srcdir)/hid/nelma/hid.conf \
213         $(srcdir)/hid/ps/hid.conf \
214         gpcb-menu.res \
215         pcb-menu.res \
216         pcbtest.sh.in \
217         dbus.xml
219 AM_YFLAGS=      -d
221 all-local: pcbtest.sh
223 pcb-menu.h : pcb-menu.res
224         echo '/* AUTOMATICALLY GENERATED FROM pcb-menu.res DO NOT EDIT */' > $@
225         echo 'const char *pcb_menu_default[] = {' >> $@
226         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/pcb-menu.res >> $@
227         echo '0};' >> $@
229 gpcb-menu.h : gpcb-menu.res
230         echo '/* AUTOMATICALLY GENERATED FROM gpcb-menu.res DO NOT EDIT */' > $@
231         echo 'const char *gpcb_menu_default[] = {' >> $@
232         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/",/' < ${srcdir}/gpcb-menu.res >> $@
233         echo '0};' >> $@
235 hid/common/hidlist.h : Makefile
236         $(MKDIR_P) hid/common
237         true > $@
238         for e in ${HIDLIST}; do \
239           echo "HID_DEF($${e})" >> $@; \
240         done
242 libgtk_a_CPPFLAGS = -I./hid/gtk
243 LIBGTK_SRCS = \
244         dolists.h \
245         hid/hidint.h \
246         hid/gtk/gtkhid-main.c \
247         hid/gtk/gtkhid-gdk.c \
248         hid/gtk/gtkhid.h \
249         hid/gtk/gui.h \
250         hid/gtk/gui-command-window.c \
251         hid/gtk/gui-config.c \
252         hid/gtk/gui-dialog-print.c \
253         hid/gtk/gui-dialog-size.c \
254         hid/gtk/gui-dialog.c \
255         hid/gtk/gui-drc-window.c \
256         hid/gtk/gui-drc-window.h \
257         hid/gtk/gui-keyref-window.c \
258         hid/gtk/gui-library-window.c \
259         hid/gtk/gui-library-window.h \
260         hid/gtk/gui-log-window.c \
261         hid/gtk/gui-misc.c \
262         hid/gtk/gui-netlist-window.c \
263         hid/gtk/gui-output-events.c \
264         hid/gtk/gui-pinout-preview.c \
265         hid/gtk/gui-pinout-preview.h \
266         hid/gtk/gui-pinout-window.c \
267         hid/gtk/gui-render-pixmap.c \
268         hid/gtk/gui-top-window.c \
269         hid/gtk/gui-utils.c
270 libgtk_a_SOURCES = ${LIBGTK_SRCS} hid/gtk/gtk_lists.h
272 hid/gtk/gtk_lists.h : ${LIBGTK_SRCS} Makefile
273         $(MKDIR_P) hid/gtk
274         true > $@
275         (for f in ${LIBGTK_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
276         mv $@.tmp $@
278 # If we are building with dbus support, we need some extra files
279 if WITH_DBUS
280 dbus-introspect.h : dbus.xml Makefile
281         echo '/* AUTOMATICALLY GENERATED FROM dbus.xml DO NOT EDIT */' > $@.tmp
282         echo "static char *pcb_dbus_introspect_xml ="  > $@.tmp
283         sed 's/\\/\\\\/g; s/"/\\"/g; s/^/"/; s/$$/"/' < $(srcdir)/dbus.xml >> $@.tmp
284         echo ";" >> $@.tmp
285         mv $@.tmp $@
287 PCB_SRCS+=      ${DBUS_SRCS}
288 BUILT_SOURCES+= dbus-introspect.h
290 endif
292 # If we are building on win32, then compile in some icons for the
293 # desktop and application toolbar
294 if WIN32
295 pcb_icon.o : pcb_icon.ico $(srcdir)/hid/gtk/pcb.rc
296         $(WINDRES) $(srcdir)/hid/gtk/pcb.rc $@
298 pcb_icon.ico: $(top_srcdir)/data/pcb_icon.ico
299         cp $(top_srcdir)/data/pcb_icon.ico $@
301 pcb_LDADD+=                     pcb_icon.o
302 pcb_DEPENDENCIES+=      pcb_icon.o
304 endif
307 liblesstif_a_CPPFLAGS = -I./hid/lesstif
308 LIBLESSTIF_SRCS = \
309         dolists.h \
310         hid/hidint.h \
311         hid/lesstif/dialogs.c \
312         hid/lesstif/lesstif.h \
313         hid/lesstif/library.c \
314         hid/lesstif/main.c \
315         hid/lesstif/menu.c \
316         hid/lesstif/netlist.c \
317         hid/lesstif/styles.c \
318         hid/lesstif/xincludes.h 
319 liblesstif_a_SOURCES = ${LIBLESSTIF_SRCS} hid/lesstif/lesstif_lists.h
321 hid/lesstif/lesstif_lists.h : ${LIBLESSTIF_SRCS} Makefile
322         $(MKDIR_P) hid/lesstif
323         true > $@
324         (for f in ${LIBLESSTIF_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
325         mv $@.tmp $@
327 libgts_a_CPPFLAGS = -I./gts
328 LIBGTS_SRCS = \
329         gts/object.c \
330         gts/point.c \
331         gts/vertex.c \
332         gts/segment.c \
333         gts/edge.c \
334         gts/triangle.c \
335         gts/face.c \
336         gts/kdtree.c \
337         gts/bbtree.c \
338         gts/misc.c \
339         gts/gts-private.h \
340         gts/predicates.c \
341         gts/predicates.h \
342         gts/rounding.h \
343         gts/heap.c \
344         gts/eheap.c \
345         gts/fifo.c \
346         gts/gts.h \
347         gts/matrix.c \
348         gts/surface.c \
349         gts/stripe.c \
350         gts/vopt.c \
351         gts/refine.c \
352         gts/iso.c \
353         gts/isotetra.c \
354         gts/split.c \
355         gts/psurface.c \
356         gts/hsurface.c \
357         gts/cdt.c \
358         gts/boolean.c \
359         gts/named.c \
360         gts/oocs.c \
361         gts/container.c \
362         gts/graph.c \
363         gts/pgraph.c \
364         gts/partition.c \
365         gts/curvature.c \
366         gts/tribox3.c
367 libgts_a_SOURCES = ${LIBGTS_SRCS} gts/gts_lists.h
369 gts/gts_lists.h : ${LIBGTS_SRCS} Makefile
370         $(MKDIR_P) gts
371         true > $@
372 # Uncomment out the following if/when we ever end up with REGISTER in any of the gts
373 # source files.  For now, there aren't any and so the grep fails and make stops
374 #       (for f in ${LIBGTS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
375 #       mv $@.tmp $@
377 libbatch_a_CPPFLAGS = -I./hid/batch
378 LIBBATCH_SRCS = \
379         hid/hidint.h \
380         hid/batch/batch.c 
381 libbatch_a_SOURCES = ${LIBBATCH_SRCS} hid/batch/batch_lists.h
383 hid/batch/batch_lists.h : ${LIBBATCH_SRCS} Makefile
384         $(MKDIR_P) hid/batch
385         true > $@
386         (for f in ${LIBBATCH_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
387         mv $@.tmp $@
389 libgerber_a_SOURCES = \
390         hid/hidint.h \
391         hid/gerber/gerber.c
393 libbom_a_SOURCES = \
394         hid/hidint.h \
395         hid/bom/bom.c
397 libps_a_CPPFLAGS = -I./hid/ps
398 LIBPS_SRCS = \
399         dolists.h \
400         hid/hidint.h \
401         hid/ps/ps.c \
402         hid/ps/ps.h \
403         hid/ps/eps.c 
404 libps_a_SOURCES = ${LIBPS_SRCS} hid/ps/ps_lists.h
406 hid/ps/ps_lists.h : ${LIBPS_SRCS} Makefile
407         $(MKDIR_P) hid/ps
408         true > $@
409         (for f in ${LIBPS_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
410         mv $@.tmp $@
412 libpng_a_CPPFLAGS = -I./hid/png
413 LIBPNG_SRCS = \
414         dolists.h \
415         hid/hidint.h \
416         hid/png/png.c \
417         hid/png/png.h 
418 libpng_a_SOURCES = ${LIBPNG_SRCS} hid/png/png_lists.h
420 hid/png/png_lists.h : ${LIBPNG_SRCS} Makefile
421         $(MKDIR_P) hid/png
422         true > $@
423         (for f in ${LIBPNG_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
424         mv $@.tmp $@
426 libgcode_a_CPPFLAGS = -I./hid/gcode
427 LIBGCODE_SRCS = \
428         dolists.h \
429         hid/hidint.h \
430         hid/gcode/gcode.c \
431         hid/gcode/gcode.h \
432         hid/gcode/decompose.c \
433         hid/gcode/decompose.h \
434         hid/gcode/trace.c \
435         hid/gcode/trace.h \
436         hid/gcode/curve.c \
437         hid/gcode/curve.h \
438         hid/gcode/auxiliary.h \
439         hid/gcode/bitmap.h \
440         hid/gcode/lists.h \
441         hid/gcode/potracelib.h 
442 libgcode_a_SOURCES = ${LIBGCODE_SRCS} hid/gcode/gcode_lists.h
444 hid/gcode/gcode_lists.h : ${LIBGCODE_SRCS} Makefile
445         $(MKDIR_P) hid/gcode
446         true > $@
447         (for f in ${LIBGCODE_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
448         mv $@.tmp $@
450 libnelma_a_CPPFLAGS = -I./hid/nelma
451 LIBNELMA_SRCS = \
452         dolists.h \
453         hid/hidint.h \
454         hid/nelma/nelma.c \
455         hid/nelma/nelma.h 
456 libnelma_a_SOURCES = ${LIBNELMA_SRCS} hid/nelma/nelma_lists.h
458 hid/nelma/nelma_lists.h : ${LIBNELMA_SRCS} Makefile
459         $(MKDIR_P) hid/nelma
460         true > $@
461         (for f in ${LIBNELMA_SRCS} ; do cat $(srcdir)/$$f ; done) | grep "^REGISTER" > $@.tmp
462         mv $@.tmp $@
464 liblpr_a_SOURCES = \
465         hid/hidint.h \
466         hid/lpr/lpr.c
468 DISTCLEANFILES= pcbtest.sh gpcb-menu.h pcb-menu.h \
469         hid/batch/batch_lists.h \
470         hid/common/hidlist.h \
471         hid/gtk/gtk_lists.h \
472         hid/lesstif/lesstif_lists.h \
473         hid/png/png_lists.h \
474         hid/gcode/gcode_lists.h \
475         hid/nelma/nelma_lists.h \
476         hid/ps/ps_lists.h \
477         gts/gts_lists.h \
478         core_lists.h \
479         dbus-introspect.h
481 # create wrapper script that lets you test pcb prior to installation
482 pcbtest.sh:     $(srcdir)/pcbtest.sh.in Makefile
483         sed -e 's;@BUILDDIR@;${abs_builddir};g' -e 's;@TOP_BUILDDIR@;${abs_top_builddir};g' \
484                 -e 's;@TOPSRCDIR@;${abs_top_srcdir};g' \
485                 $(srcdir)/pcbtest.sh.in > $@
486         chmod 755 $@