#----------------------------------------------------------------
# Makefile for BDNET to IF convertor
#
VDT 	= ../..
BIN 	= $(VDT)/bin
INC	= $(VDT)/include
LIB	= $(VDT)/lib

#----------------------------------------------------------------
# Compile and Link Rules
#
DBGFLAG	= -g -DDEBUG
C++	= g++ -static

CFLAGS 	= $(DBGFLAG) -I$(INC)
LIBS	= $(LIB)/libpi.a

.SUFFIXES: .cc
.cc.o:
	$(C++) $(CFLAGS) $(CPPFLAGS) -c $<

#----------------------------------------------------------------
# Program Sources
#
TARGET	= bd2vhd
HDRS	= token.h 
SRCS	= main.cc parse.cc build.cc
OBJS	= $(SRCS:.cc=.o)

#####################################################################
all: $(TARGET)

install: $(TARGET)
	install -d $(BIN)
	install $? $(BIN)

clean:
	$(RM) $(TARGET) $(OBJS)

$(TARGET): $(OBJS) $(LIBS)
	$(C++) -o $@ $(OBJS) $(LIBS)

# DO NOT DELETE

build.o: token.h
parse.o: token.h
