# Makefile for sample 
#
# (template Makefile for simple targets)
#
# Core Library, $Id: Makefile,v 1.9 2003/06/18 20:25:36 exact Exp $

#=================================================
# If you set VAR below, it would override the default values
#	for VAR in ../Make.options or ../../Make.config.
# This is useful for deciding which "variant" of the Core Library
#	you want to use each time.
#=================================================

VAR=Debug
VAR=
LEV=3

# where are all the CORE stuff?
ifndef CORE_PATH
	CORE_PATH=/Users/pikalaw/Projects/core
endif

include $(CORE_PATH)/progs/Make.options

#=================================================
# Define target files (put all your files here)
#=================================================
TARGETS= snf

all: $(TARGETS) 

test: $(TARGETS)
	./snf

snf: snf.o

DEP=

#=================================================
# Rules
#=================================================
%: %.o
	${CXX} $(LDFLAGS) $< -lcorex++$(VAR)_level$(LEV) $(CORE_LIB) -o $@

%.o: %.cpp $(DEP)
	${CXX} -c $(CXXFLAGS) $(CORE_INC) $< -o $@

#=================================================
# Clean object files
#=================================================
clean:
	-@test -z "*.o" || rm -f *.o

#=================================================
# Remove executable files
#=================================================
EXEPROGS=$(TARGETS:=$(EXETYPE))

veryclean: clean
	-@test -z "$(EXEPROGS)" || rm -f $(EXEPROGS)

