# Tim Hsu
# 2021-07-29
#
# Demonstration of Makefile to work with VCPKG
# and it's dependencies
# https://github.com/microsoft/vcpkg

#########################################
#  USAGE:                               #
#                                       #
#  Type 'make [Enter]' to create        #
#  Type 'make all' to rebuild all       #
#  Type 'make install' to install       #
#  Type 'make run' to run exe           #
#  Type 'make clean' to clean up        #
#########################################

CPP = g++

PROJEXE = projmain
PROJSRC = main.cpp
EXEPATH = /usr/local/bin

CFLAGS = -o
LFLAGS = -lm

ARGS = ""
WARN = -Wall -g

LIB = -L/usr/local/lib
INC = -I//home/sptrader/github/vcpkg/packages/rapidjson_x64-linux/include

project: ${PROJEXE}

all: clean project

#########################################
#  Create project executables..         #
#########################################

${PROJEXE}:
	${CPP} ${WARN} ${INC} ${CFLAGS} $@ ${PROJSRC}

#########################################
#  Install ...                          #
#########################################

install:
	sudo cp -u ${PROJEXE} ${EXEPATH}

#########################################
#  Clean Up...                          #
#########################################

clean:
	-rm -f ${PROJEXE}

#########################################
#  Run Project...                       #
#########################################

run:
	@$(MAKE) && ./$(PROJEXE) $(ARGS)


# #################################################################
# #include <rapidjson/document.h>
# #include <rapidjson/writer.h>
# #include <rapidjson/stringbuffer.h>
# #include <iostream>
#
# using namespace rapidjson;
#
# int main(int argc, char* argv[])
# {
#        const char* json = "";
#
#        Document d;
#        d.Parse(json);
#
#        printf("Hello This is working with VCPKG\n");
#
#        return 0;
# }
# #################################################################