# examples/c++/Makefile.examples.in for PLplot
# Copyright (C) 2002 Maurice LeBrun
# Copyright (C) 2002-2019 Alan W. Irwin
# Copyright (C) 2003-2005 Rafael Laboissiere
# Copyright (C) 2004-2012 Andrew Ross
#
# This file is part of PLplot.
#
# PLplot is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# PLplot is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public License
# along with the file PLplot; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA

SHELL = /usr/local/bin/bash
CXX = /usr/obj/ports/plplot-5.15.0/bin/c++  -O2 -pipe
EXEEXT = 

PKG_CONFIG_ENV = PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"
install_tree_cxx_RPATHCMD = -Wl,-rpath -Wl,""

#install_tree_wxwidgets_RPATHCMD = 
#PLPLOTWXWIDGETS_EXECUTABLES_list = \
#	$(EXEEXT)

#QT_MOC_EXECUTABLE = 
#install_tree_qt_RPATHCMD = 
#qt_gui_EXECUTABLES_list = \
#	qt_example$(EXEEXT)

EXECUTABLES_list = \
		 x01cc$(EXEEXT) \
		 x00$(EXEEXT) \
		 x01$(EXEEXT) \
		 x02$(EXEEXT) \
		 x03$(EXEEXT) \
		 x04$(EXEEXT) \
		 x05$(EXEEXT) \
		 x06$(EXEEXT) \
		 x07$(EXEEXT) \
		 x08$(EXEEXT) \
		 x09$(EXEEXT) \
		 x10$(EXEEXT) \
		 x11$(EXEEXT) \
		 x12$(EXEEXT) \
		 x13$(EXEEXT) \
		 x14$(EXEEXT) \
		 x15$(EXEEXT) \
		 x16$(EXEEXT) \
		 x17$(EXEEXT) \
		 x18$(EXEEXT) \
		 x19$(EXEEXT) \
		 x20$(EXEEXT) \
		 x21$(EXEEXT) \
		 x22$(EXEEXT) \
		 x23$(EXEEXT) \
		 x24$(EXEEXT) \
		 x25$(EXEEXT) \
		 x26$(EXEEXT) \
		 x27$(EXEEXT) \
		 x28$(EXEEXT) \
		 x29$(EXEEXT) \
		 x30$(EXEEXT) \
		 x31$(EXEEXT) \
		 x33$(EXEEXT) \
		 $(PLPLOTWXWIDGETS_EXECUTABLES_list) \
		 $(qt_gui_EXECUTABLES_list)


all: $(EXECUTABLES_list)

clean:
	rm -f $(EXECUTABLES_list)

# target_link_libraries(wxPLplotDemo plplotwxwidgets plplotcxx  /usr/lib/libm.so.10.1)
#$(EXEEXT): .cpp
#	$(CXX) $< -o $@ $(install_tree_wxwidgets_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags --libs plplot-wxwidgets plplot-c++)  /usr/lib/libm.so.10.1

# Note, must filter out -p options which confuse $(QT_MOC_EXECUTABLE).  Such
# options (e.g., -pthread) tend to appear in the static driver case.
#moc_qt_PlotWindow.cpp: qt_PlotWindow.h
#	$(QT_MOC_EXECUTABLE) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags-only-I plplot-qt) $< -o $@

# For the ENABLE_DYNDRIVERS=ON case, must include link to the plplot-qt library
# target_link_libraries(qt_example  plplotqt plplot)
# For the ENABLE_DYNDRIVERS=OFF case, drop the link to the plplot-qt library (to avoid memory
# management issues when linking to identical code in two different libraries).
# target_link_libraries(qt_example  plplot)
#qt_example$(EXEEXT): qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp
#	$(CXX)  qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(install_tree_qt_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags --libs plplot-qt) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags --libs plplot) 
##	$(CXX)  qt_example.cpp qt_PlotWindow.cpp moc_qt_PlotWindow.cpp -o $@ $(install_tree_qt_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags --libs plplot) 

# target_link_libraries(x plplotcxx /usr/lib/libm.so.10.1)
.cc$(EXEEXT):
	$(CXX) $< -o $@ $(install_tree_cxx_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags --libs plplot-c++) /usr/lib/libm.so.10.1

.SUFFIXES: .cc $(EXEEXT)
