1eac25cf7327af4c99433f05ef9c08a4ebc4484a
[spectmorph.git] / glui / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 SUBDIRS = pugl
4
5 if COND_LINUX
6   PUGL_LIBS = pugl/libspectmorphpugl.la -lX11 -lGL
7   SMFDIALOG = smextfiledialog.cc
8 endif
9
10 if COND_MACOS
11   PUGL_LIBS = pugl/libspectmorphpugl.la
12   PUGL_LDFLAGS = -framework Cocoa -framework OpenGL
13   SMFDIALOG = smmacfiledialog.mm
14
15   # FIXME: there may be a cleaner solution to compile in C++11 mode
16   libspectmorphglui_la_OBJCXXFLAGS = $(AM_OBJCFLAGS) $(AM_CXXFLAGS) -std=gnu++11
17 endif
18
19 if COND_WINDOWS
20   PUGL_LIBS = pugl/libspectmorphpugl.la -lopengl32 -lgdi32 -luser32 -lcomdlg32
21   SMFDIALOG = smwinfiledialog.cc
22 endif
23
24 SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la
25
26 lib_LTLIBRARIES = libspectmorphglui.la
27
28 SMSRCS = smwidget.cc smwindow.cc smmorphplanview.cc smmorphplanwindow.cc \
29          smmorphsourceview.cc smmorphoutputview.cc smcomboboxoperator.cc \
30          smmorphlinearview.cc smpropertyview.cc smmorphlfoview.cc \
31          smmorphgridview.cc smmorphgridwidget.cc smmessagebox.cc \
32          smmorphoperatorview.cc $(SMFDIALOG) \
33          smdialog.cc smaboutdialog.cc smmorphplancontrol.cc \
34          smdrawutils.cc smrenameopwindow.cc smmorphwavsourceview.cc \
35          smtimer.cc smshortcut.cc
36
37 SMHDRS = smlabel.hh smslider.hh smwidget.hh smwindow.hh smframe.hh \
38          smcombobox.hh smdrawutils.hh smscrollbar.hh smmenubar.hh \
39          smmorphplanwindow.hh smmorphplancontrol.hh smmorphplanview.hh \
40          smfixedgrid.hh smmorphoperatorview.hh smmorphsourceview.hh \
41          smmorphoutputview.hh smcomboboxoperator.hh smmorphlinearview.hh \
42          smcheckbox.hh smpropertyview.hh smmorphlfoview.hh smscrollview.hh \
43          smbutton.hh smtoolbutton.hh smmorphgridview.hh smmorphgridwidget.hh \
44          smlineedit.hh smnativefiledialog.hh smled.hh \
45          smdialog.hh smaboutdialog.hh smoperatorlayout.hh \
46          smmessagebox.hh smrenameopwindow.hh smoutputadsrwidget.hh \
47          smmorphwavsourceview.hh smsamplewidget.hh sminsteditwindow.hh \
48          smtimer.hh smsynthinterface.hh smshortcut.hh sminsteditparams.hh
49
50 libspectmorphglui_la_SOURCES = $(SMSRCS) $(SMHDRS)
51 libspectmorphglui_la_CXXFLAGS = $(AM_CXXFLAGS)
52 libspectmorphglui_la_LIBADD = $(SPECTMORPH_LIBS) $(PUGL_LIBS) $(CAIRO_LIBS) $(BSE_LIBS)
53 libspectmorphglui_la_LDFLAGS = -no-undefined $(PUGL_LDFLAGS)
54 libspectmorphglui_la_LIBTOOLFLAGS = --tag CXX
55
56 AM_CXXFLAGS += $(BSE_CFLAGS) $(CAIRO_CFLAGS) -I$(top_srcdir)/lib -I$(top_srcdir)/src -I$(top_srcdir)/glui -DPUGL_HAVE_GL -DPUGL_HAVE_CAIRO -I$(top_srcdir)/vst
57
58 smuitest_SOURCES = smuitest.cc
59 smuitest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
60 smuitest_LDFLAGS = $(PUGL_LDFLAGS)
61
62 smscrolltest_SOURCES = smscrolltest.cc
63 smscrolltest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
64 smscrolltest_LDFLAGS = $(PUGL_LDFLAGS)
65
66 smplantest_SOURCES = smplantest.cc
67 smplantest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
68 smplantest_LDFLAGS = $(PUGL_LDFLAGS)
69
70 noinst_PROGRAMS = smuitest smplantest smscrolltest
71
72 smgluiincludedir = $(includedir)/spectmorph/smglui
73 smgluiinclude_HEADERS = $(SMHDRS) spectmorphglui.hh
74
75 rebuild-spectmorphglui-hh:
76         echo "// SpectMorph GUI meta-include (generated by cd glui; make rebuild-spectmorphglui-hh)" > gen-spectmorphglui.hh
77         echo "#include \"spectmorph.hh\"" >> gen-spectmorphglui.hh
78         for h in $(SMHDRS); do \
79           echo "#include \"$$h\""; \
80         done | sort >> gen-spectmorphglui.hh
81         mv gen-spectmorphglui.hh spectmorphglui.hh