#------------------------------------------------------------- -*- makefile -*-
#
# Makefile for building Pgtcl
#
# Basic build, test and install
#   set PGSQLDIR=c:\Program Files\PostgreSQL\12 (replace with your Postgres installation folder)
#   nmake /s /nologo /f makefile.vc INSTALLDIR=c:\path\to\tcl
#   nmake /s /nologo /f makefile.vc INSTALLDIR=c:\path\to\tcl test
#   nmake /s /nologo /f makefile.vc INSTALLDIR=c:\path\to\tcl install
#
# For other build options (debug, static etc.)
# see TIP 477 (https://core.tcl.tk/tips/doc/trunk/tip/477.md) for detailed documentation.
# 
#------------------------------------------------------------------------------

# pgtcl is spelled in lowercase to match the package name in configure.in, to extract version number from there
# actual package name 'Pgtcl' is hard-coded in pkgIndex.tcl.in
PROJECT = pgtcl

# NB! LIBDIR must be defined *before* including rules-ext.vc in order to install postgres-helpers.tcl
LIBDIR = ..

!include "rules-ext.vc"

PRJ_OBJS = \
	$(TMP_DIR)\pgtclId.obj \
    $(TMP_DIR)\pgtclCmds.obj \
	$(TMP_DIR)\pgtcl.obj \
    $(TMP_DIR)\tokenize.obj

PRJ_INCLUDES = -I"$(PGSQLDIR)\include"
PRJ_LIBS     = "$(PGSQLDIR)\lib\libpq.lib" ws2_32.lib

PRJ_DEFINES = -D_CRT_SECURE_NO_WARNINGS

!include "$(_RULESDIR)\targets.vc"

pkgindex: default-pkgindex-tea

# Note: the SQLite bridge option is not supported by this makefile yet
