Fix aven startup with no file on macos
[survex.git] / src / Makefile.am
blobe8249ddae7a439e8ec30c36198fa7897190cb1ff
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 uninstall-hook:
26         rm -f $(DESTDIR)$(bindir)/3dtopos$(EXEEXT)
28 check_PROGRAMS = imgtest
30 COMMONSRC = cmdline.c message.c str.c filename.c osdepend.c z_getopt.c getopt1.c
32 cavern_SOURCES = cavern.c date.c listpos.c commands.c datain.c netskel.c \
33  network.c readval.c matrix.c img_hosted.c netbits.c useful.c \
34  validate.c netartic.c thgeomag.c \
35  $(COMMONSRC)
36 cavern_LDADD = $(PROJ_LIBS)
38 aven_SOURCES = aven.cc gfxcore.cc mainfrm.cc model.cc vector3.cc aboutdlg.cc \
39  namecompare.cc aventreectrl.cc export.cc guicontrol.cc gla-gl.cc \
40  glbitmapfont.cc gpx.cc json.cc kml.cc log.cc moviemaker.cc hpgl.cc \
41  cavernlog.cc avenprcore.cc printing.cc buttontaghandler.cc pos.cc \
42  date.c img_hosted.c useful.c hash.c \
43  brotatemask.xbm brotate.xbm handmask.xbm hand.xbm \
44  rotatemask.xbm rotate.xbm vrotatemask.xbm vrotate.xbm \
45  rotatezoom.xbm rotatezoommask.xbm \
46  $(COMMONSRC)
48 dump3d_SOURCES = dump3d.c date.c img_hosted.c useful.c \
49  $(COMMONSRC)
51 if WIN32
52 aven_LDADD = avenrc.o $(LIBOBJS) $(LIBAV_LIBS) $(WX_LIBS) $(PROJ_LIBS)
54 avenrc.o: $(srcdir)/aven.rc ../lib/icons/aven.ico
55         pwd=`pwd` && cd $(srcdir) && `$(WX_CONFIG) --rescomp` --include-dir "$$pwd/../lib/icons" -o "$$pwd/avenrc.o" aven.rc
57 else
58 aven_LDADD = $(LIBOBJS) $(WX_LIBS) $(PROJ_LIBS) $(LIBAV_LIBS)
59 endif
61 AM_CFLAGS += $(PROJ_CFLAGS)
63 aven_CFLAGS = $(AM_CFLAGS) $(WX_CFLAGS) -DAVEN
64 aven_CXXFLAGS = $(AM_CXXFLAGS) $(PROJ_CFLAGS) $(LIBAV_CFLAGS) $(WX_CXXFLAGS)
65 aven_LDFLAGS =
67 survexport_CXXFLAGS = $(AM_CXXFLAGS) $(PROJ_CFLAGS) $(WX_CXXFLAGS)
68 survexport_LDFLAGS =
69 survexport_LDADD = $(LIBOBJS) $(WX_LIBS) $(PROJ_LIBS)
71 if MACOS
72 # FIXME: It looks like modern wx-config should give us this...
73 aven_LDFLAGS += -framework OpenGL
74 endif
76 diffpos_SOURCES = diffpos.c namecmp.c img_hosted.c useful.c hash.c \
77  $(COMMONSRC)
78 sorterr_SOURCES = sorterr.c $(COMMONSRC)
79 extend_SOURCES = extend.c img_hosted.c useful.c hash.c \
80  $(COMMONSRC)
82 survexport_SOURCES = survexport.cc model.cc export.cc namecompare.cc \
83                 useful.c hash.c img_hosted.c \
84                 gpx.cc hpgl.cc json.cc kml.cc pos.cc vector3.cc $(COMMONSRC)
86 #testerr_SOURCES = testerr.c message.c filename.c useful.c osdepend.c
88 imgtest_SOURCES = imgtest.c img.c
90 all_sources = \
91         $(noinst_HEADERS) \
92         $(COMMONSRC) \
93         $(cavern_SOURCES) \
94         $(aven_SOURCES) \
95         $(dump3d_SOURCES) \
96         $(diffpos_SOURCES) \
97         $(sorterr_SOURCES) \
98         $(extend_SOURCES) \
99         $(survexport_SOURCES)
101 ../lib/survex.pox: $(all_sources) ../lib/extract-msgs.pl
102         cd $(srcdir)/../lib && ./extract-msgs.pl `echo $(all_sources)|perl -ne 'print "../src/$$_\n" for sort split'|uniq` > survex.pox
104 EXTRA_DIST = \
105  aven.rc getopt.c gettexttomsg.pl gradient.pov gdtconvert gen_img2aven \
106  igrf13coeffs.txt igrf2c.py
108 BUILT_SOURCES = z_getopt.c avenpal.h img2aven.h thgeomagdata.h
110 z_getopt.c: getopt.c gettexttomsg.pl
111         ./gettexttomsg.pl `test -f getopt.c || echo '$(srcdir)/'`getopt.c > z_getopt.c~ && mv z_getopt.c~ z_getopt.c
113 avenpal.h: $(srcdir)/gdtconvert $(srcdir)/gradient.pov
114         $(srcdir)/gdtconvert < $(srcdir)/gradient.pov > tmp-avenpal.h && mv tmp-avenpal.h avenpal.h
116 img2aven.h: $(srcdir)/gen_img2aven
117         $(srcdir)/gen_img2aven > tmp-img2aven.h && mv tmp-img2aven.h img2aven.h
119 PYTHON = python3
121 thgeomagdata.h: $(srcdir)/igrf2c.py $(srcdir)/igrf13coeffs.txt
122         $(PYTHON) $(srcdir)/igrf2c.py $(srcdir)/igrf13coeffs.txt
123         mv ../thgeomagdata.h .
125 MAINTAINERCLEANFILES =\
126  $(BUILT_SOURCES)