#
# MAKEFILE - Makefile for FieldTalk example applications
#
# FOCUS Software Engineering Pty Ltd, Australia. <www.focus-sw.com>
#
# Note: Build environments and compiler versions are changing frequently.
# If you cannot build this module, please modify this Makefile and report
# the changes to support@focus-sw.com. Thank You.
#
# Requires: MS nmake and MS C++ Compiler Ver 13.10 (Visual C++ .net 2003)
#       or: Borland make v5.2 and Borland C++ 5.3 on Windows 2000
#


!ifdef _NMAKE_VER
# MS VC++ and nmake
CFLAGS=-W4
LDFLAGS=Ws2_32.lib
EOPT=-Fe
OS_EXT=win32_vc
!else
# Borland C++ and Borland make
CFLAGS=
LDFLAGS=
EOPT=-e
OS_EXT=win32_bc
!endif

TARGET_NAME=modpoll

TARGET_DIR=$(OS_EXT)

LIB_DIR = ..\..\lib\$(OS_EXT)

LIB_NAME = $(LIB_DIR)\libmbusmaster.lib


$(TARGET_DIR)\$(TARGET_NAME):
        -mkdir $(TARGET_DIR)
	$(CC) $(CFLAGS) -I..\..\include $(EOPT)$* $(TARGET_NAME).cpp $(LIB_NAME) $(LDFLAGS)
        @echo.
        @echo $(TARGET_NAME) successfully compiled.
        @echo.
