# Makefile for lsts2dot and lsts2pn
# Copyright © 2002 Marko Mäkelä

# Flag: use the framework library (TVT 2.1 and later)
FRAMEWORK = yes
#FRAMEWORK =
# TVT version number "%u%03u%03uL", major, minor, patchlevel
#DEFINES = -DTVT_VERSION=2002002L# not needed for TVT 2.3

# Location of the TVT source code
TVTSRC = Src

# The libraries (TVT 2.3.3)
LIBS = $(TVTSRC)/libtvt.a
# The libraries (older TVT versions)
#FWLIBS = $(FRAMEWORK:yes=-L$(TVTSRC)/FrameWork -lclp)
#LIBS = -L$(TVTSRC)/FileFormats -lfileformats $(FWLIBS)

# Directories for the header files
FWINCLUDES = $(FRAMEWORK:yes=-I$(TVTSRC)/FrameWork)
INCLUDES = $(FWINCLUDES) \
	-I$(TVTSRC)/FileFormats \
	-I$(TVTSRC)/FileFormats/LSTS_File \
	-I$(TVTSRC)/FileFormats/LSTS_File/LSTS_Sections \
	-I$(TVTSRC)/FileFormats/FileFormat
# Preprocessor flags
CPPFLAGS = $(INCLUDES) $(DEFINES)

# Targets
TARGETS = lsts2pn lsts2dot

# Tools
RM = rm -f
CXX = g++
CXXFLAGS =

all: $(TARGETS)
clean:
	$(RM) $(TARGETS)

lsts2pn: lsts2pn.C
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) lsts2pn.C -o lsts2pn $(LIBS)
lsts2dot: lsts2dot.C
	$(CXX) $(CXXFLAGS) $(CPPFLAGS) lsts2dot.C -o lsts2dot $(LIBS)

.phony: all clean
