Install survexport as 3dtopos too
[survex.git] / src / Makefile.am
blobb0aa21b8902092b873c5da8397ca321d89efe4cd
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 gllogerror.h guicontrol.h gla.h gpx.h moviemaker.h\
9  exportfilter.h hpgl.h cavernlog.h aboutdlg.h aven.h avenpal.h gfxcore.h\
10  json.h log.h mainfrm.h pos.h vector3.h wx.h aventypes.h aventreectrl.h\
11  export.h model.h printing.h avenprcore.h img2aven.h thgeomag.h\
12  thgeomagdata.h 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 install-exec-hook:
20         ln $(DESTDIR)$(bindir)/survexport$(EXEEXT) \
21            $(DESTDIR)$(bindir)/3dtopos$(EXEEXT) || \
22             cp -p $(DESTDIR)$(bindir)/survexport$(EXEEXT) \
23                   $(DESTDIR)$(bindir)/3dtopos$(EXEEXT)
25 check_PROGRAMS = imgtest
27 COMMONSRC = cmdline.c message.c str.c filename.c osdepend.c z_getopt.c getopt1.c
29 cavern_SOURCES = cavern.c date.c listpos.c commands.c datain.c netskel.c \
30  network.c readval.c matrix.c img_hosted.c netbits.c useful.c \
31  validate.c netartic.c thgeomag.c \
32  $(COMMONSRC)
33 cavern_LDADD = $(PROJ_LIBS)
35 aven_SOURCES = aven.cc gfxcore.cc mainfrm.cc model.cc vector3.cc aboutdlg.cc \
36  namecompare.cc aventreectrl.cc export.cc guicontrol.cc gla-gl.cc \
37  glbitmapfont.cc gpx.cc json.cc kml.cc log.cc moviemaker.cc hpgl.cc \
38  cavernlog.cc avenprcore.cc printing.cc buttontaghandler.cc pos.cc \
39  date.c img_hosted.c useful.c hash.c \
40  brotatemask.xbm brotate.xbm handmask.xbm hand.xbm \
41  rotatemask.xbm rotate.xbm vrotatemask.xbm vrotate.xbm \
42  rotatezoom.xbm rotatezoommask.xbm \
43  $(COMMONSRC)
45 dump3d_SOURCES = dump3d.c date.c img_hosted.c useful.c \
46  $(COMMONSRC)
48 if WIN32
49 aven_LDADD = avenrc.o $(LIBOBJS) $(LIBAV_LIBS) $(WX_LIBS) $(PROJ_LIBS)
51 avenrc.o: $(srcdir)/aven.rc ../lib/icons/aven.ico
52         pwd=`pwd` && cd $(srcdir) && `$(WX_CONFIG) --rescomp` --include-dir "$$pwd/../lib/icons" -o "$$pwd/avenrc.o" aven.rc
54 else
55 aven_LDADD = $(LIBOBJS) $(WX_LIBS) $(PROJ_LIBS) $(LIBAV_LIBS)
56 endif
58 AM_CFLAGS += $(PROJ_CFLAGS)
60 aven_CFLAGS = $(AM_CFLAGS) $(WX_CFLAGS) -DAVEN
61 aven_CXXFLAGS = $(AM_CXXFLAGS) $(PROJ_CFLAGS) $(LIBAV_CFLAGS) $(WX_CXXFLAGS)
62 aven_LDFLAGS =
64 survexport_CXXFLAGS = $(AM_CXXFLAGS) $(PROJ_CFLAGS) $(WX_CXXFLAGS)
65 survexport_LDFLAGS =
66 survexport_LDADD = $(LIBOBJS) $(WX_LIBS) $(PROJ_LIBS)
68 if MACOSX
69 # FIXME: It looks like modern wx-config should give us this...
70 aven_LDFLAGS += -framework OpenGL
71 endif
73 diffpos_SOURCES = diffpos.c namecmp.c img_hosted.c useful.c hash.c \
74  $(COMMONSRC)
75 sorterr_SOURCES = sorterr.c $(COMMONSRC)
76 extend_SOURCES = extend.c img_hosted.c useful.c hash.c \
77  $(COMMONSRC)
79 survexport_SOURCES = survexport.cc model.cc export.cc namecompare.cc \
80                 useful.c hash.c img_hosted.c \
81                 gpx.cc hpgl.cc json.cc kml.cc pos.cc vector3.cc $(COMMONSRC)
83 #testerr_SOURCES = testerr.c message.c filename.c useful.c osdepend.c
85 imgtest_SOURCES = imgtest.c img.c
87 all_sources = \
88         $(noinst_HEADERS) \
89         $(COMMONSRC) \
90         $(cavern_SOURCES) \
91         $(aven_SOURCES) \
92         $(dump3d_SOURCES) \
93         $(diffpos_SOURCES) \
94         $(sorterr_SOURCES) \
95         $(extend_SOURCES) \
96         $(survexport_SOURCES)
98 ../lib/survex.pox: $(all_sources) ../lib/extract-msgs.pl
99         cd $(srcdir)/../lib && ./extract-msgs.pl `echo $(all_sources)|perl -ne 'print "../src/$$_\n" for sort split'|uniq` > survex.pox
101 EXTRA_DIST = \
102  aven.rc getopt.c gettexttomsg.pl gradient.pov gdtconvert gen_img2aven \
103  igrf12coeffs.txt igrf2c.py
105 BUILT_SOURCES = z_getopt.c avenpal.h img2aven.h thgeomagdata.h
107 z_getopt.c: getopt.c gettexttomsg.pl
108         ./gettexttomsg.pl `test -f getopt.c || echo '$(srcdir)/'`getopt.c > z_getopt.c~ && mv z_getopt.c~ z_getopt.c
110 avenpal.h: $(srcdir)/gdtconvert $(srcdir)/gradient.pov
111         $(srcdir)/gdtconvert < $(srcdir)/gradient.pov > tmp-avenpal.h && mv tmp-avenpal.h avenpal.h
113 img2aven.h: $(srcdir)/gen_img2aven
114         $(srcdir)/gen_img2aven > tmp-img2aven.h && mv tmp-img2aven.h img2aven.h
116 thgeomagdata.h: $(srcdir)/igrf2c.py $(srcdir)/igrf12coeffs.txt
117         python $(srcdir)/igrf2c.py $(srcdir)/igrf12coeffs.txt
118         mv ../thgeomagdata.h .
120 MAINTAINERCLEANFILES =\
121  $(BUILT_SOURCES)