# examples/tk/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) 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/bin/bash.exe
CC = /clang64/bin/clang.exe  -march=nocona -msahf -mtune=generic -O2 -pipe -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wp,-D__USE_MINGW_ANSI_STDIO=1 -Wno-incompatible-pointer-types -Wno-implicit-function-declaration -Wno-int-conversion
EXEEXT = .exe

PKG_CONFIG_ENV = PKG_CONFIG_PATH="lib/pkgconfig:/D/M/msys64/clang64/lib/pkgconfig:/D/M/msys64/clang64/share/pkgconfig"
install_tree_tk_RPATHCMD = 

EXECUTABLES_list = xtk01$(EXEEXT)
# Second and fourth examples depend on itk.
#itk_EXECUTABLES_list = xtk02$(EXEEXT) xtk04$(EXEEXT)

all: $(EXECUTABLES_list) $(itk_EXECUTABLES_list)

clean:
	rm -f $(EXECUTABLES_list) $(itk_EXECUTABLES_list)

#if(tcltk_in_plplot_library)
#  target_link_libraries( plplottcltk_Main plplot /clang64/lib/libtk.dll.a /clang64/lib/libtcl.dll.a )
#else(tcltk_in_plplot_library)
#  target_link_libraries( plplottcltk_Main plplottcltk tclmatrix plplot /clang64/lib/libtk.dll.a /clang64/lib/libtcl.dll.a )
#endif(tcltk_in_plplot_library)
.c$(EXEEXT):
#	$(CC) $< -o $@ $(install_tree_tk_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags plplot-tcl_Main plplot) $(shell $(PKG_CONFIG_ENV) pkg-config  --libs plplot-tcl_Main plplot) -L"/clang64/lib" -ltk.dll -L"/clang64/lib" -ltcl.dll 
	$(CC) $< -o $@ $(install_tree_tk_RPATHCMD) $(shell $(PKG_CONFIG_ENV) pkg-config  --cflags --libs plplot-tcl_Main plplot-tcl plplot) -ltclmatrix -L"/clang64/lib" -ltk.dll -L"/clang64/lib" -ltcl.dll 

.SUFFIXES: .c $(EXEEXT)
