Rename cad3d to survexport
[survex.git] / src / Makefile.am
blobf81478c5bc24380e2228518d3bc96aa021c145ab
1 ## Process this file with automake to produce Makefile.in
3 noinst_HEADERS = cavern.h commands.h cmdline.h date.h datain.h debug.h\
4  filelist.h filename.h getopt.h hash.h img.c img.h img_hosted.h kml.h\
5  labelinfo.h listpos.h matrix.h message.h namecmp.h namecompare.h netartic.h\
6  netbits.h netskel.h network.h osalloc.h\
7  osdepend.h ostypes.h out.h readval.h str.h useful.h validate.h whichos.h\
8  glbitmapfont.h guicontrol.h gla.h gpx.h moviemaker.h exportfilter.h hpgl.h\
9  cavernlog.h aboutdlg.h aven.h avenpal.h gfxcore.h json.h log.h mainfrm.h\
10  pos.h vector3.h wx.h aventypes.h aventreectrl.h export.h model.h printing.h\
11  avenprcore.h img2aven.h thgeomag.h thgeomagdata.h\
12  moviemaker-legacy.cc
14 LDADD = $(LIBOBJS)
16 # FIXME: mingw_progs in top level Makefile.am needs keeping in step with this
17 bin_PROGRAMS = cavern diffpos dump3d extend sorterr survexport aven
19 check_PROGRAMS = imgtest
21 COMMONSRC = cmdline.c message.c str.c filename.c osdepend.c z_getopt.c getopt1.c
23 cavern_SOURCES = cavern.c date.c listpos.c commands.c datain.c netskel.c \
24  network.c readval.c matrix.c img_hosted.c netbits.c useful.c \
25  validate.c netartic.c thgeomag.c \
26  $(COMMONSRC)
27 cavern_LDADD = $(PROJ_LIBS)
29 aven_SOURCES = aven.cc gfxcore.cc mainfrm.cc model.cc vector3.cc aboutdlg.cc \
30  namecompare.cc aventreectrl.cc export.cc guicontrol.cc gla-gl.cc \
31  glbitmapfont.cc gpx.cc json.cc kml.cc log.cc moviemaker.cc hpgl.cc \
32  cavernlog.cc avenprcore.cc printing.cc buttontaghandler.cc pos.cc \
33  date.c img_hosted.c useful.c hash.c \
34  brotatemask.xbm brotate.xbm handmask.xbm hand.xbm \
35  rotatemask.xbm rotate.xbm vrotatemask.xbm vrotate.xbm \
36  rotatezoom.xbm rotatezoommask.xbm \
37  $(COMMONSRC)
39 dump3d_SOURCES = dump3d.c date.c img_hosted.c useful.c \
40  $(COMMONSRC)
42 if WIN32
43 aven_LDADD = avenrc.o $(LIBOBJS) $(LIBAV_LIBS) $(WX_LIBS) $(PROJ_LIBS)
45 avenrc.o: $(srcdir)/aven.rc ../lib/icons/aven.ico
46         pwd=`pwd` && cd $(srcdir) && `$(WX_CONFIG) --rescomp` --include-dir "$$pwd/../lib/icons" -o "$$pwd/avenrc.o" aven.rc
48 else
49 aven_LDADD = $(LIBOBJS) $(WX_LIBS) $(PROJ_LIBS) $(LIBAV_LIBS)
50 endif
52 AM_CFLAGS += $(PROJ_CFLAGS)
54 aven_CFLAGS = $(AM_CFLAGS) $(WX_CFLAGS) -DAVEN
55 aven_CXXFLAGS = $(AM_CXXFLAGS) $(PROJ_CFLAGS) $(LIBAV_CFLAGS) $(WX_CXXFLAGS)
56 aven_LDFLAGS =
58 survexport_CXXFLAGS = $(AM_CXXFLAGS) $(PROJ_CFLAGS) $(WX_CXXFLAGS)
59 survexport_LDFLAGS =
60 survexport_LDADD = $(LIBOBJS) $(WX_LIBS) $(PROJ_LIBS)
62 if MACOSX
63 # FIXME: It looks like modern wx-config should give us this...
64 aven_LDFLAGS += -framework OpenGL
65 endif
67 diffpos_SOURCES = diffpos.c namecmp.c img_hosted.c useful.c hash.c \
68  $(COMMONSRC)
69 sorterr_SOURCES = sorterr.c $(COMMONSRC)
70 extend_SOURCES = extend.c img_hosted.c useful.c hash.c \
71  $(COMMONSRC)
73 survexport_SOURCES = survexport.cc model.cc export.cc namecompare.cc \
74                 useful.c hash.c img_hosted.c \
75                 gpx.cc hpgl.cc json.cc kml.cc pos.cc vector3.cc $(COMMONSRC)
77 #testerr_SOURCES = testerr.c message.c filename.c useful.c osdepend.c
79 imgtest_SOURCES = imgtest.c img.c
81 all_sources = \
82         $(noinst_HEADERS) \
83         $(COMMONSRC) \
84         $(cavern_SOURCES) \
85         $(aven_SOURCES) \
86         $(dump3d_SOURCES) \
87         $(diffpos_SOURCES) \
88         $(sorterr_SOURCES) \
89         $(extend_SOURCES) \
90         $(survexport_SOURCES)
92 ../lib/survex.pox: $(all_sources) ../lib/extract-msgs.pl
93         cd $(srcdir)/../lib && ./extract-msgs.pl `echo $(all_sources)|perl -ne 'print "../src/$$_\n" for sort split'|uniq` > survex.pox
95 EXTRA_DIST = \
96  aven.rc getopt.c gettexttomsg.pl gradient.pov gdtconvert gen_img2aven \
97  igrf12coeffs.txt igrf2c.py
99 BUILT_SOURCES = z_getopt.c avenpal.h img2aven.h thgeomagdata.h
101 z_getopt.c: getopt.c gettexttomsg.pl
102         ./gettexttomsg.pl `test -f getopt.c || echo '$(srcdir)/'`getopt.c > z_getopt.c~ && mv z_getopt.c~ z_getopt.c
104 avenpal.h: $(srcdir)/gdtconvert $(srcdir)/gradient.pov
105         $(srcdir)/gdtconvert < $(srcdir)/gradient.pov > tmp-avenpal.h && mv tmp-avenpal.h avenpal.h
107 img2aven.h: $(srcdir)/gen_img2aven
108         $(srcdir)/gen_img2aven > tmp-img2aven.h && mv tmp-img2aven.h img2aven.h
110 thgeomagdata.h: $(srcdir)/igrf2c.py $(srcdir)/igrf12coeffs.txt
111         python $(srcdir)/igrf2c.py $(srcdir)/igrf12coeffs.txt
112         mv ../thgeomagdata.h .
114 MAINTAINERCLEANFILES =\
115  $(BUILT_SOURCES)