# ----------------------------------------------------------------------------
# DO NOT EDIT -           Another Twyman mangled file           - DO NOT EDIT
# 
# Created by Jim Twyman
# Project Name: Modbus
# Generated: Fri Jan 07 10:46:16 EST 2005
# 
# 
# DO NOT EDIT -           Another Twyman mangled file           - DO NOT EDIT
# ----------------------------------------------------------------------------

ifndef CFG
CFG = Modbus - Release
endif

BUILD_CFG =
PRODUCT = Modbus

# User-defined initialization

-include Makefile.init

.PHONY: all

all: $(PRODUCT)

# Some arch may use -fpic; -fPIC should always work
ifeq "$(USE_PIC)" "1"
ifeq "$(USE_OPTIMIZED_PIC)" "1"
PIC = -fpic
else
PIC = -fPIC
endif
endif



SOURCES = \
	BusProtocolErrors.c  MbusAsciiMasterProtocol.cpp  MbusMasterCwrapper.cpp  MbusMasterFunctions.cpp \
	MbusRtuMasterProtocol.cpp  MbusRtuOverTcpMasterProtocol.cpp  MbusScanScheduler.cpp  MbusSerialMasterProtocol.cpp \
	MbusTcpMasterProtocol.cpp  hmlib/common/hmcrc16.c  hmlib/common/hmhex.c  hmlib/linux/hmserio.cpp \
	hmlib/posix1/hmtimer.cpp

OBJS = \
	BusProtocolErrors.o  MbusAsciiMasterProtocol.o  MbusMasterCwrapper.o  MbusMasterFunctions.o \
	MbusRtuMasterProtocol.o  MbusRtuOverTcpMasterProtocol.o  MbusScanScheduler.o  MbusSerialMasterProtocol.o \
	MbusTcpMasterProtocol.o  hmlib/common/hmcrc16.o  hmlib/common/hmhex.o  hmlib/linux/hmserio.o \
	hmlib/posix1/hmtimer.o

# ----------------------------------------------------------------------------
# Configuration Modbus - Release
# ----------------------------------------------------------------------------

ifeq ("$(CFG)", "Modbus - Release")

BUILD_CFG = $(CFG)
PATH := /opt/timesys/linux/4.0/toolchains/i586-linux/bin:$(PATH)
BUILD_DIR = .

NM = i586-linux-nm
STRIP = i586-linux-strip
LD = i586-linux-ld
AS = i586-linux-as
AR = i586-linux-ar
OBJCOPY = i586-linux-objcopy
OBJDUMP = i586-linux-objdump
RANLIB = i586-linux-ranlib
CPP = i586-linux-cpp
CXX = i586-linux-g++
DEBUGGER = i586-linux-gdb
CC = i586-linux-gcc

CPPFLAGS_FOR_PROJECT += -DNDEBUG   -I/home/Modbus/fieldtalk/src/              \
                                   -I/home/Modbus/fieldtalk/src/hmlib/common  \
                                   -I/home/Modbus/fieldtalk/src/hmlib/linux   \
                                   -I/home/Modbus/fieldtalk/src/hmlib/posix1
ASFLAGS_FOR_PROJECT += 
CFLAGS_FOR_PROJECT += -O2  -Wall
CXXFLAGS_FOR_PROJECT += -O2  -Wall
LDFLAGS_FOR_PROJECT += -olibmbusmaster  -shared -lrt 
CFLAGS_FOR_PROJECT += $(PIC)
CXXFLAGS_FOR_PROJECT += $(PIC)

# Dependencies

BusProtocolErrors.o: BusProtocolErrors.c hmplatf.h hmlib/common/hmplatf.h \
  BusProtocolErrors.h

MbusAsciiMasterProtocol.o: MbusAsciiMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h hmhex.h hmlib/common/hmhex.h \
  MbusAsciiMasterProtocol.hpp MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusMasterCwrapper.o: MbusMasterCwrapper.cpp MbusMasterCwrapper.h \
  BusProtocolErrors.h MbusRtuMasterProtocol.hpp \
  MbusSerialMasterProtocol.hpp hmserio.hpp hmlib/common/hmserio.hpp \
  hmlib/common/hmplatf.h MbusMasterFunctions.hpp hmtimer.hpp \
  hmlib/common/hmtimer.hpp MbusAsciiMasterProtocol.hpp \
  MbusTcpMasterProtocol.hpp hmtcpip.h hmlib/common/hmtcpip.h

MbusMasterFunctions.o: MbusMasterFunctions.cpp hmplatf.h \
  hmlib/common/hmplatf.h hmtracelog.h hmlib/common/hmtracelog.h \
  MbusMasterFunctions.hpp hmtimer.hpp hmlib/common/hmtimer.hpp \
  BusProtocolErrors.h FieldTalkVersion.h

MbusRtuMasterProtocol.o: MbusRtuMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h hmcrc16.h hmlib/common/hmcrc16.h \
  MbusRtuMasterProtocol.hpp MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusRtuOverTcpMasterProtocol.o: MbusRtuOverTcpMasterProtocol.cpp \
  hmtracelog.h hmlib/common/hmtracelog.h hmcrc16.h hmlib/common/hmcrc16.h \
  MbusRtuOverTcpMasterProtocol.hpp hmtcpip.h hmlib/common/hmtcpip.h \
  hmlib/common/hmplatf.h MbusMasterFunctions.hpp hmtimer.hpp \
  hmlib/common/hmtimer.hpp BusProtocolErrors.h MbusTcpMasterProtocol.hpp

MbusScanScheduler.o: MbusScanScheduler.cpp MbusScanScheduler.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp hmlib/common/hmplatf.h \
  MbusMasterFunctions.hpp BusProtocolErrors.h

MbusSerialMasterProtocol.o: MbusSerialMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusTcpMasterProtocol.o: MbusTcpMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h MbusTcpMasterProtocol.hpp hmtcpip.h \
  hmlib/common/hmtcpip.h hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

hmcrc16.o: hmlib/common/hmcrc16.c hmlib/common/hmcrc16.h

hmhex.o: hmlib/common/hmhex.c hmlib/common/hmhex.h

hmserio.o: hmlib/linux/hmserio.cpp hmlib/common/hmtimer.hpp \
  hmlib/common/hmplatf.h hmlib/common/hmserio.hpp

hmtimer.o: hmlib/posix1/hmtimer.cpp hmlib/common/hmplatf.h \
  hmlib/common/hmtimer.hpp

endif # Modbus - Release

# ----------------------------------------------------------------------------
# Configuration Modbus - Debug
# ----------------------------------------------------------------------------

ifeq ("$(CFG)", "Modbus - Debug")

BUILD_CFG = $(CFG)
PATH := /opt/timesys/linux/4.0/toolchains/i586-linux/bin:$(PATH)
BUILD_DIR = .

NM = i586-linux-nm
STRIP = i586-linux-strip
LD = i586-linux-ld
AS = i586-linux-as
AR = i586-linux-ar
OBJCOPY = i586-linux-objcopy
OBJDUMP = i586-linux-objdump
RANLIB = i586-linux-ranlib
CPP = i586-linux-cpp
CXX = i586-linux-g++
DEBUGGER = i586-linux-gdb
CC = i586-linux-gcc

CPPFLAGS_FOR_PROJECT += -D_DEBUG   -I/home/Modbus/fieldtalk/src/              \
                                   -I/home/Modbus/fieldtalk/src/hmlib/common  \
                                   -I/home/Modbus/fieldtalk/src/hmlib/linux   \
                                   -I/home/Modbus/fieldtalk/src/hmlib/posix1
ASFLAGS_FOR_PROJECT += --gstabs 
CFLAGS_FOR_PROJECT += -O0 -g 
CXXFLAGS_FOR_PROJECT += -O0 -g 
LDFLAGS_FOR_PROJECT += -oModbus  
CFLAGS_FOR_PROJECT += $(PIC)
CXXFLAGS_FOR_PROJECT += $(PIC)

# Dependencies

BusProtocolErrors.o: BusProtocolErrors.c hmplatf.h hmlib/common/hmplatf.h \
  BusProtocolErrors.h

MbusAsciiMasterProtocol.o: MbusAsciiMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h hmhex.h hmlib/common/hmhex.h \
  MbusAsciiMasterProtocol.hpp MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusMasterCwrapper.o: MbusMasterCwrapper.cpp MbusMasterCwrapper.h \
  BusProtocolErrors.h MbusRtuMasterProtocol.hpp \
  MbusSerialMasterProtocol.hpp hmserio.hpp hmlib/common/hmserio.hpp \
  hmlib/common/hmplatf.h MbusMasterFunctions.hpp hmtimer.hpp \
  hmlib/common/hmtimer.hpp MbusAsciiMasterProtocol.hpp \
  MbusTcpMasterProtocol.hpp hmtcpip.h hmlib/common/hmtcpip.h

MbusMasterFunctions.o: MbusMasterFunctions.cpp hmplatf.h \
  hmlib/common/hmplatf.h hmtracelog.h hmlib/common/hmtracelog.h \
  MbusMasterFunctions.hpp hmtimer.hpp hmlib/common/hmtimer.hpp \
  BusProtocolErrors.h FieldTalkVersion.h

MbusRtuMasterProtocol.o: MbusRtuMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h hmcrc16.h hmlib/common/hmcrc16.h \
  MbusRtuMasterProtocol.hpp MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusRtuOverTcpMasterProtocol.o: MbusRtuOverTcpMasterProtocol.cpp \
  hmtracelog.h hmlib/common/hmtracelog.h hmcrc16.h hmlib/common/hmcrc16.h \
  MbusRtuOverTcpMasterProtocol.hpp hmtcpip.h hmlib/common/hmtcpip.h \
  hmlib/common/hmplatf.h MbusMasterFunctions.hpp hmtimer.hpp \
  hmlib/common/hmtimer.hpp BusProtocolErrors.h MbusTcpMasterProtocol.hpp

MbusScanScheduler.o: MbusScanScheduler.cpp MbusScanScheduler.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp hmlib/common/hmplatf.h \
  MbusMasterFunctions.hpp BusProtocolErrors.h

MbusSerialMasterProtocol.o: MbusSerialMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusTcpMasterProtocol.o: MbusTcpMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h MbusTcpMasterProtocol.hpp hmtcpip.h \
  hmlib/common/hmtcpip.h hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

hmcrc16.o: hmlib/common/hmcrc16.c hmlib/common/hmcrc16.h

hmhex.o: hmlib/common/hmhex.c hmlib/common/hmhex.h

hmserio.o: hmlib/linux/hmserio.cpp hmlib/common/hmtimer.hpp \
  hmlib/common/hmplatf.h hmlib/common/hmserio.hpp

hmtimer.o: hmlib/posix1/hmtimer.cpp hmlib/common/hmplatf.h \
  hmlib/common/hmtimer.hpp

endif # Modbus - Debug

# ----------------------------------------------------------------------------
# Configuration Modbus - Profile
# ----------------------------------------------------------------------------

ifeq ("$(CFG)", "Modbus - Profile")

BUILD_CFG = $(CFG)
PATH := /opt/timesys/linux/4.0/toolchains/i586-linux/bin:$(PATH)
BUILD_DIR = .

NM = i586-linux-nm
STRIP = i586-linux-strip
LD = i586-linux-ld
AS = i586-linux-as
AR = i586-linux-ar
OBJCOPY = i586-linux-objcopy
OBJDUMP = i586-linux-objdump
RANLIB = i586-linux-ranlib
CPP = i586-linux-cpp
CXX = i586-linux-g++
DEBUGGER = i586-linux-gdb
CC = i586-linux-gcc

CPPFLAGS_FOR_PROJECT += -DNDEBUG  -DPROFILE   -I/home/Modbus/fieldtalk/src/              \
                                   -I/home/Modbus/fieldtalk/src/hmlib/common  \
                                   -I/home/Modbus/fieldtalk/src/hmlib/linux   \
                                   -I/home/Modbus/fieldtalk/src/hmlib/posix1 
ASFLAGS_FOR_PROJECT += 
CFLAGS_FOR_PROJECT += -O1 -pg 
CXXFLAGS_FOR_PROJECT += -O1 -pg 
LDFLAGS_FOR_PROJECT += -oModbus  
CFLAGS_FOR_PROJECT += $(PIC)
CXXFLAGS_FOR_PROJECT += $(PIC)

# Dependencies

BusProtocolErrors.o: BusProtocolErrors.c hmplatf.h hmlib/common/hmplatf.h \
  BusProtocolErrors.h

MbusAsciiMasterProtocol.o: MbusAsciiMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h hmhex.h hmlib/common/hmhex.h \
  MbusAsciiMasterProtocol.hpp MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusMasterCwrapper.o: MbusMasterCwrapper.cpp MbusMasterCwrapper.h \
  BusProtocolErrors.h MbusRtuMasterProtocol.hpp \
  MbusSerialMasterProtocol.hpp hmserio.hpp hmlib/common/hmserio.hpp \
  hmlib/common/hmplatf.h MbusMasterFunctions.hpp hmtimer.hpp \
  hmlib/common/hmtimer.hpp MbusAsciiMasterProtocol.hpp \
  MbusTcpMasterProtocol.hpp hmtcpip.h hmlib/common/hmtcpip.h

MbusMasterFunctions.o: MbusMasterFunctions.cpp hmplatf.h \
  hmlib/common/hmplatf.h hmtracelog.h hmlib/common/hmtracelog.h \
  MbusMasterFunctions.hpp hmtimer.hpp hmlib/common/hmtimer.hpp \
  BusProtocolErrors.h FieldTalkVersion.h

MbusRtuMasterProtocol.o: MbusRtuMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h hmcrc16.h hmlib/common/hmcrc16.h \
  MbusRtuMasterProtocol.hpp MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusRtuOverTcpMasterProtocol.o: MbusRtuOverTcpMasterProtocol.cpp \
  hmtracelog.h hmlib/common/hmtracelog.h hmcrc16.h hmlib/common/hmcrc16.h \
  MbusRtuOverTcpMasterProtocol.hpp hmtcpip.h hmlib/common/hmtcpip.h \
  hmlib/common/hmplatf.h MbusMasterFunctions.hpp hmtimer.hpp \
  hmlib/common/hmtimer.hpp BusProtocolErrors.h MbusTcpMasterProtocol.hpp

MbusScanScheduler.o: MbusScanScheduler.cpp MbusScanScheduler.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp hmlib/common/hmplatf.h \
  MbusMasterFunctions.hpp BusProtocolErrors.h

MbusSerialMasterProtocol.o: MbusSerialMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h MbusSerialMasterProtocol.hpp hmserio.hpp \
  hmlib/common/hmserio.hpp hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

MbusTcpMasterProtocol.o: MbusTcpMasterProtocol.cpp hmtracelog.h \
  hmlib/common/hmtracelog.h MbusTcpMasterProtocol.hpp hmtcpip.h \
  hmlib/common/hmtcpip.h hmlib/common/hmplatf.h MbusMasterFunctions.hpp \
  hmtimer.hpp hmlib/common/hmtimer.hpp BusProtocolErrors.h

hmcrc16.o: hmlib/common/hmcrc16.c hmlib/common/hmcrc16.h

hmhex.o: hmlib/common/hmhex.c hmlib/common/hmhex.h

hmserio.o: hmlib/linux/hmserio.cpp hmlib/common/hmtimer.hpp \
  hmlib/common/hmplatf.h hmlib/common/hmserio.hpp

hmtimer.o: hmlib/posix1/hmtimer.cpp hmlib/common/hmplatf.h \
  hmlib/common/hmtimer.hpp

endif # Modbus - Profile

# ----------------------------------------------------------------------------
# Project files
# ----------------------------------------------------------------------------

BusProtocolErrors.o:
	$(CC) $(CFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ BusProtocolErrors.c

MbusAsciiMasterProtocol.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusAsciiMasterProtocol.cpp

MbusMasterCwrapper.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusMasterCwrapper.cpp

MbusMasterFunctions.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusMasterFunctions.cpp

MbusRtuMasterProtocol.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusRtuMasterProtocol.cpp

MbusRtuOverTcpMasterProtocol.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusRtuOverTcpMasterProtocol.cpp

MbusScanScheduler.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusScanScheduler.cpp

MbusSerialMasterProtocol.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusSerialMasterProtocol.cpp

MbusTcpMasterProtocol.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ MbusTcpMasterProtocol.cpp

hmlib/common/hmcrc16.o:
	$(CC) $(CFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ hmlib/common/hmcrc16.c

hmlib/common/hmhex.o:
	$(CC) $(CFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ hmlib/common/hmhex.c

hmlib/linux/hmserio.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ hmlib/linux/hmserio.cpp

hmlib/posix1/hmtimer.o:
	$(CXX) $(CXXFLAGS_FOR_PROJECT) $(CPPFLAGS_FOR_PROJECT) -c -o $@ hmlib/posix1/hmtimer.cpp

# ----------------------------------------------------------------------------
# Project targets
# ----------------------------------------------------------------------------

# User-defined macro definitions

-include Makefile.defs

ifeq "$(BUILD_CFG)" ""
$(error No build configuration specified.)
endif

ifeq "$(SOURCES)" ""
$(error Project does not contain any source files)
endif

# Targets

.PHONY: rebuild clean distclean

$(PRODUCT): $(OBJS)
	$(AR) $(AR_MYFLAGS) rcs $(PRODUCT).a $^
	cp $(PRODUCT).a  libmbusmaster.a
	-@$(RM) -R $(OBJS)
	-@$(RM) -R $(PRODUCT).a


rebuild: clean all

clean:
	@for obj in $(OBJS); do rm -f $${obj}; done;
	-@$(RM) $(PRODUCT)
	-@$(RM) core

distclean: clean
	-@$(RM) *~

# User-defined targets

-include Makefile.targets

