
# SimParm: Simple and flexible C++ configuration framework
# Copyright (C) 2007 Australian National University
# 
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
# 
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.
# 
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
# 
# Contact:
# Kevin Pulo
# kevin.pulo@anu.edu.au
# Leonard Huxley Bldg 56
# Australian National University, ACT, 0200, Australia


ifeq ($(COMPILER),gcc)
CXX = g++
CXXFLAGS = -Wall
CXXFLAGS += -Wextra
#CXXFLAGS += -Werror
#CXXFLAGS += -pedantic
CXXFLAGS += -ansi
CXXFLAGS += -ggdb
CXXFLAGS += -O2
CXXFLAGS += -I../libsimparm
LDLIBS  = -lm
LDLIBS += -L../libsimparm -lsimparm
else ifeq ($(COMPILER),intel)
CXX = icpc
CXXFLAGS = -g
CXXFLAGS += -O2
CXXFLAGS += -ipo
CXXFLAGS += -I../libsimparm
LDLIBS  = -lm
LDLIBS += -L../libsimparm -lsimparm
endif

PROGRAMS  = example-config
PROGRAMS += testconfig

all: $(PROGRAMS)

$(PROGRAMS): %: %.cc
	$(CXX) $(CXXFLAGS) -o $@ $< $(LDLIBS)

install:
	$(INSTALL) -m 0755 -d $(BIN_PREFIX)
	$(INSTALL) -m 0755 $(PROGRAMS) $(BIN_PREFIX)

clean:
	$(RM) -f $(PROGRAMS)


