# Makefile for gString object file, optional link library and gs_test test app.
#   Invoke using "gmake"
# Mahlon R. Smith, The Software Samurai
# Tools: GNU G++ / Gcc 13.2.1 or greater
# Note: The build requires support for the C++11 standard (C++13 recommended).
# 
# Note: gString need not be configured as a library. 
#       The object file can be linked directly into your own application.
# The gString class is also integrated into the NcDialog API library 
# which is available as a separate distribution archive.

COMPILE = g++ -x c++ -std=gnu++11 -Wall -c

#** Build the temporary test application **
gs_test: gs_test.o gString.a
	g++ -o gs_test gs_test.o gString.a

gs_test.o: gs_test.cpp 
	$(COMPILE) gs_test.cpp

#** Compile the gString object module and build the gString link library **
gString.a: gString.o
	ar -Pcrv gString.a gString.o

gString.o: gString.cpp gString.hpp
	$(COMPILE) gString.cpp

