source: git/src/Makefile.am

Last change on this file was 2279fbed, checked in by Olly Betts <olly@…>, 4 months ago

Clean up OpenGL header inclusion

Probe for whether we have GL/glu.h or OpenGL/glu.h instead of checking
if APPLE is defined.

Fix the probe for GL/glext.h - we need to include gl.h first, but
had a hard-coded GL/gl.h which means this probe would always fail
on macOS.

  • Property mode set to 100644
File size: 4.4 KB
RevLine 
[076cb4e]1## Process this file with automake to produce Makefile.in
2
[71aa081]3# Allow easy overriding via: make WERROR=
4AM_CFLAGS += $(WERROR)
5AM_CXXFLAGS += $(WERROR)
6
[1ee204e]7noinst_HEADERS = cavern.h commands.h cmdline.h date.h datain.h debug.h\
[1940bcd]8 filelist.h filename.h getopt.h hash.h img.c img.h img_for_survex.h kml.h\
[381ae6e]9 labelinfo.h listpos.h matrix.h message.h namecmp.h namecompare.h netartic.h\
10 netbits.h netskel.h network.h osalloc.h\
[07a6d16]11 out.h readval.h str.h useful.h validate.h gdalexport.h\
[3d7085b]12 glbitmapfont.h gllogerror.h guicontrol.h gla.h gpx.h moviemaker.h\
[355df41]13 export3d.h exportfilter.h hpgl.h cavernlog.h aboutdlg.h aven.h avenpal.h\
[2279fbed]14 gfxcore.h json.h log.h mainfrm.h pos.h vector3.h wx.h\
[028716d]15 aventreectrl.h export.h model.h printing.h avenprcore.h img2aven.h\
[355df41]16 thgeomag.h thgeomagdata.h moviemaker-legacy.cc
[076cb4e]17
[f665d6e]18LDADD = $(LIBOBJS)
[1c59cbb]19
[79b32a95]20bin_PROGRAMS = cavern diffpos dump3d extend sorterr survexport aven
[c1a9449]21
[167626d]22install-exec-hook:
23        ln $(DESTDIR)$(bindir)/survexport$(EXEEXT) \
24           $(DESTDIR)$(bindir)/3dtopos$(EXEEXT) || \
25            cp -p $(DESTDIR)$(bindir)/survexport$(EXEEXT) \
26                  $(DESTDIR)$(bindir)/3dtopos$(EXEEXT)
27
[1ce8aba]28uninstall-hook:
29        rm -f $(DESTDIR)$(bindir)/3dtopos$(EXEEXT)
30
[57cecaa]31check_PROGRAMS = imgtest
[076cb4e]32
[c606770]33COMMONSRC = cmdline.c message.c str.c filename.c z_getopt.c getopt1.c
[608e8b1]34
[725d3b1]35cavern_SOURCES = cavern.c date.c commands.c datain.c hash.c listpos.c \
[1940bcd]36 netskel.c network.c readval.c matrix.c img_for_survex.c netbits.c \
[4b34f80]37 validate.c netartic.c thgeomag.c \
[a4ae909]38 $(COMMONSRC)
[8c87227]39cavern_LDADD = $(PROJ_LIBS)
[076cb4e]40
[bec42b2]41aven_SOURCES = aven.cc gfxcore.cc mainfrm.cc model.cc vector3.cc aboutdlg.cc \
[85f7905]42 namecompare.cc aventreectrl.cc export.cc export3d.cc \
43 gdalexport.cc gla-gl.cc glbitmapfont.cc gpx.cc guicontrol.cc  \
44 json.cc kml.cc log.cc moviemaker.cc hpgl.cc \
[f31090c]45 cavernlog.cc avenprcore.cc printing.cc pos.cc \
[1940bcd]46 date.c img_for_survex.c hash.c \
[41adebb]47 brotatemask.xbm brotate.xbm handmask.xbm hand.xbm \
[7098518]48 rotatemask.xbm rotate.xbm vrotatemask.xbm vrotate.xbm \
[aa49d2b]49 rotatezoom.xbm rotatezoommask.xbm \
[75dea56]50 $(COMMONSRC)
[5809313]51
[1940bcd]52dump3d_SOURCES = dump3d.c date.c img_for_survex.c \
[a405bc1]53 $(COMMONSRC)
[7011db8]54
[51eab3b]55aven_LDADD = $(LIBOBJS) $(WX_LIBS) $(GDAL_LIBS) $(PROJ_LIBS) $(FFMPEG_LIBS)
[9701cae]56
[af1b2c0]57if WIN32
[9701cae]58aven_LDADD += avenrc.o
[416d6ef]59
[98b97c6]60avenrc.o: $(srcdir)/aven.rc ../lib/icons/aven.ico
[e4ba2b7]61        cd $(srcdir) && `$(WX_CONFIG) --rescomp` --include-dir '$(abs_top_builddir)/lib/icons' -o '$(abs_builddir)/avenrc.o' aven.rc
[1a79173]62
63bin_PROGRAMS += wrapaven wrapsurvexport
64
65wrapaven_SOURCES = wrapaven.c
66wrapaven_LDFLAGS = -mwindows -municode
67
68wrapsurvexport_SOURCES = wrapsurvexport.c
[af1b2c0]69endif
70
[f678705]71AM_CFLAGS += $(PROJ_CFLAGS)
72
73aven_CFLAGS = $(AM_CFLAGS) $(WX_CFLAGS) -DAVEN
[78dac2e]74aven_CXXFLAGS = $(AM_CXXFLAGS) $(GDAL_CFLAGS) $(PROJ_CFLAGS) $(FFMPEG_CFLAGS) $(WX_CXXFLAGS)
[1deb6b5]75aven_LDFLAGS =
[1a5c545]76
[85f7905]77survexport_CXXFLAGS = $(AM_CXXFLAGS) $(GDAL_CFLAGS) $(PROJ_CFLAGS) $(WX_CXXFLAGS)
78survexport_LDFLAGS =
79survexport_LDADD = $(LIBOBJS) $(WX_LIBS) $(GDAL_LIBS) $(PROJ_LIBS)
80
[1940bcd]81diffpos_SOURCES = diffpos.c namecmp.c img_for_survex.c hash.c \
[a405bc1]82 $(COMMONSRC)
[d06141c]83sorterr_SOURCES = sorterr.c $(COMMONSRC)
[1940bcd]84extend_SOURCES = extend.c img_for_survex.c hash.c \
[a405bc1]85 $(COMMONSRC)
[076cb4e]86
[355df41]87survexport_SOURCES = survexport.cc model.cc export.cc export3d.cc \
[1940bcd]88                gdalexport.cc namecompare.cc hash.c img_for_survex.c \
[bd30612]89                gpx.cc hpgl.cc json.cc kml.cc pos.cc vector3.cc $(COMMONSRC)
[076cb4e]90
[bf063be]91#testerr_SOURCES = testerr.c message.c filename.c
[57cecaa]92
93imgtest_SOURCES = imgtest.c img.c
[076cb4e]94
[f63bd56]95all_sources = \
96        $(noinst_HEADERS) \
97        $(COMMONSRC) \
98        $(cavern_SOURCES) \
99        $(aven_SOURCES) \
100        $(dump3d_SOURCES) \
101        $(diffpos_SOURCES) \
102        $(sorterr_SOURCES) \
103        $(extend_SOURCES) \
[79b32a95]104        $(survexport_SOURCES)
[f63bd56]105
[0dc5829]106../lib/survex.pox: $(all_sources) ../lib/extract-msgs.pl
107        cd $(srcdir)/../lib && ./extract-msgs.pl `echo $(all_sources)|perl -ne 'print "../src/$$_\n" for sort split'|uniq` > survex.pox
[f63bd56]108
[223f1ad]109EXTRA_DIST = \
[028716d]110 aven.rc getopt.c gettexttomsg.pl gradient.pov gdtconvert gen_img2aven \
[9687520]111 igrf14coeffs.txt igrf2c.py
[a580dc1]112
[028716d]113BUILT_SOURCES = z_getopt.c avenpal.h img2aven.h thgeomagdata.h
[a580dc1]114
[c40038a]115z_getopt.c: getopt.c gettexttomsg.pl
[a580dc1]116        ./gettexttomsg.pl `test -f getopt.c || echo '$(srcdir)/'`getopt.c > z_getopt.c~ && mv z_getopt.c~ z_getopt.c
[f533b37]117
[f9044d0]118avenpal.h: $(srcdir)/gdtconvert $(srcdir)/gradient.pov
[1fb581f]119        $(srcdir)/gdtconvert < $(srcdir)/gradient.pov > tmp-avenpal.h && mv tmp-avenpal.h avenpal.h
[3a1524d]120
[028716d]121img2aven.h: $(srcdir)/gen_img2aven
122        $(srcdir)/gen_img2aven > tmp-img2aven.h && mv tmp-img2aven.h img2aven.h
123
[08246df]124PYTHON = python3
[b5a6aff]125
[cdc771d]126# When updating to a new IGRF version, update table in doc/datafile.rst too.
[9687520]127thgeomagdata.h: $(srcdir)/igrf2c.py $(srcdir)/igrf14coeffs.txt
128        $(PYTHON) $(srcdir)/igrf2c.py $(srcdir)/igrf14coeffs.txt
[4b34f80]129        mv ../thgeomagdata.h .
130
[223f1ad]131MAINTAINERCLEANFILES =\
132 $(BUILT_SOURCES)
Note: See TracBrowser for help on using the repository browser.