1include $(top_srcdir)/Makefile.decl
2
3SUBDIRS = pugl
4
5if COND_LINUX
6  PUGL_LIBS = pugl/libspectmorphpugl.la -lX11 $(GL_LIBS)
7  SMFDIALOG = smlinuxfiledialog.cc
8endif
9
10if 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
17endif
18
19if COND_WINDOWS
20  PUGL_LIBS = pugl/libspectmorphpugl.la -lopengl32 -lgdi32 -luser32 -lcomdlg32
21  SMFDIALOG = smwinfiledialog.cc
22endif
23
24SPECTMORPH_LIBS = $(top_builddir)/lib/libspectmorph.la
25
26lib_LTLIBRARIES = libspectmorphglui.la
27
28SMSRCS = 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 smparamlabel.cc smeventloop.cc \
36	 sminsteditwindow.cc smlineedit.cc
37
38SMHDRS = smlabel.hh smslider.hh smwidget.hh smwindow.hh smframe.hh \
39	 smcombobox.hh smdrawutils.hh smscrollbar.hh smmenubar.hh \
40	 smmorphplanwindow.hh smmorphplancontrol.hh smmorphplanview.hh \
41	 smfixedgrid.hh smmorphoperatorview.hh smmorphsourceview.hh \
42	 smmorphoutputview.hh smcomboboxoperator.hh smmorphlinearview.hh \
43	 smcheckbox.hh smpropertyview.hh smmorphlfoview.hh smscrollview.hh \
44	 smbutton.hh smtoolbutton.hh smmorphgridview.hh smmorphgridwidget.hh \
45	 smlineedit.hh smnativefiledialog.hh smled.hh \
46	 smdialog.hh smaboutdialog.hh smoperatorlayout.hh \
47	 smmessagebox.hh smrenameopwindow.hh smoutputadsrwidget.hh \
48	 smmorphwavsourceview.hh smsamplewidget.hh sminsteditwindow.hh \
49	 smtimer.hh smshortcut.hh sminsteditparams.hh \
50	 smparamlabel.hh smeventloop.hh smprogressbar.hh sminsteditnote.hh \
51	 smsimplelines.hh smoperatorrolemap.hh smlistbox.hh smenumview.hh \
52	 smcontrolview.hh
53
54libspectmorphglui_la_SOURCES = $(SMSRCS) $(SMHDRS)
55libspectmorphglui_la_CXXFLAGS = $(AM_CXXFLAGS)
56libspectmorphglui_la_LIBADD = $(SPECTMORPH_LIBS) $(PUGL_LIBS) $(FREETYPE_LIBS) $(CAIRO_LIBS) $(BSE_LIBS)
57libspectmorphglui_la_LDFLAGS = -no-undefined $(PUGL_LDFLAGS)
58libspectmorphglui_la_LIBTOOLFLAGS = --tag CXX
59
60AM_CXXFLAGS += $(BSE_CFLAGS) $(FREETYPE_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
61
62smuitest_SOURCES = smuitest.cc
63smuitest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
64smuitest_LDFLAGS = $(PUGL_LDFLAGS)
65
66smscrolltest_SOURCES = smscrolltest.cc
67smscrolltest_LDADD = libspectmorphglui.la $(SPECTMORPH_LIBS) $(BSE_LIBS) $(CAIRO_LIBS) $(PUGL_LIBS)
68smscrolltest_LDFLAGS = $(PUGL_LDFLAGS)
69
70noinst_PROGRAMS = smuitest smscrolltest
71
72smgluiincludedir = $(includedir)/spectmorph/smglui
73smgluiinclude_HEADERS = $(SMHDRS) spectmorphglui.hh
74
75rebuild-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
82