# Makefile for Dialogw  -  Invoke using "gmake" or "gmake clean"
# Mahlon R. Smith
# Tools: See information on development tools in: "../Dialog1/Makefile"
# 
# Please note that your system may require explicit path specifications for 
# linking lglib-2.0 and lglibmm-2.4. The system used for development of this 
# application uses symbolic links in /usr/lib and /user/include to make the 
# necessary files visible on the default search paths for libraries and 
# include files. Please see the Makefile for the ustringTest utility to get 
# more details on search path configuration for these libraries.
# 
# 08-Dec-2020

# Files for Dialogw Application
HFILES = GlobalDef.hpp NCurses.hpp NCursesKeyDef.hpp NcWindow.hpp NcDialog.hpp \
         gString.hpp gStringTest.hpp infoDocTest.hpp
LFILES = NcDialog.a
OFILES = Dialogw.o gStringTest.o infoDocTest.o

COMPILE = g++ -x c++ -std=gnu++11 -Wall -c
# Temporarily change -W option to stop on fatal errors. May be convenient 
# during installation and configuraton of glib/glibmm/libsigc++ libraries
#COMPILE = g++ -x c++ -std=gnu++11 -Wfatal-errors -c

Dialogw: $(OFILES) $(LFILES)
# Use this version of link invocation for full application functionality,
# including the GTK+ C library: glibmm
#	g++ -o Dialogw $(OFILES) NcDialog.a -lglib-2.0 -lglibmm-2.4 -lncursesw
# Use this version of link invocation if your system does not have 
# glib and glibmm libraries installed.
	g++ -o Dialogw $(OFILES) NcDialog.a -lncursesw

Dialogw.o: Dialogw.cpp $(HFILES) DialogAppShared.hpp 
	$(COMPILE) Dialogw.cpp

gStringTest.o: gStringTest.cpp $(HFILES)
	$(COMPILE) gStringTest.cpp

infoDocTest.o: infoDocTest.cpp $(HFILES)
	$(COMPILE) infoDocTest.cpp

#** Remove old object files and the executable for a clean build **
.PHONY: clean
clean:
	rm -f $(OFILES) Dialogw 1>/dev/null 2>/dev/null

