#
# Skeleton Makefile for Odyssey modules. Copy and modify appropriately.
#

# Path to Odyssey's root directory
ROOT	= ../../..
include $(ROOT)/Makefile.defs

BINTARGETS	=
LIBTARGETS	= $(OBJDIR)/libre_lib.a	# Libraries to build.
SCRIPTS		=		# Shell scripts. They're only installed.
L_LIBS		= -lsuif	# Libraries to link.
L_CXXFLAGS	= -I.
L_CFLAGS	= 		# Local C compiler flags
L_LFLAGS	=		# Local link flags
CC_FILES	= regexp.cc regsub.cc
C_FILES		=
H_FILES	 	= $(wildcard *.h)
O_FILES		= $(patsubst %.cc, $(OBJDIR)/%.o, $(CC_FILES))
EXPORT_H_FILES	= $(H_FILES)
EXPORT_MAN_FILES=		# Man files to install in $ODYSSEY/man

#
# Local rules. Standard rules are inherited from Odyssey's Makefiles
#
default: install

$(LIBTARGETS): $(O_FILES) $(LIBVER_O)
	$(AR) -o $@ $(O_FILES) $(LIBVER_O)

run: $(OBJDIR)/try tests 
	@echo 'Running regression tests (No output means everything is OK)'
	$(OBJDIR)/try <tests

$(OBJDIR)/try:	$(OBJDIR)/try.o $(LIBTARGETS)
	$(CXX) -o $@ $(OBJDIR)/try.o -L$(OBJDIR) -ld_lib


#
# Standard rules. Must be included at the end.
#
include $(ROOT)/Makefile.rules
