aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-05 17:42:11 +0000
committerjthorn <jthorn@f88db872-0e4f-0410-b76b-b9085cfa78c5>2002-04-05 17:42:11 +0000
commitff3ab848cd06fa4d7de9e073513a65cea66b1c8b (patch)
treef768e06e5d6d773d19a28659e1e958b198c43f87 /src
parentccd862d20b63013401472d1f1442b4f54dc6220d (diff)
get rid of old Makefile since we're now building within Cactus
new makefile --> quick/dirty, builds test programs only git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinAnalysis/AHFinderDirect/trunk@437 f88db872-0e4f-0410-b76b-b9085cfa78c5
Diffstat (limited to 'src')
-rw-r--r--src/jtutil/Makefile103
-rw-r--r--src/jtutil/make.code.defn8
-rw-r--r--src/jtutil/makefile45
3 files changed, 53 insertions, 103 deletions
diff --git a/src/jtutil/Makefile b/src/jtutil/Makefile
deleted file mode 100644
index 618754a..0000000
--- a/src/jtutil/Makefile
+++ /dev/null
@@ -1,103 +0,0 @@
-# Makefile for utility libraries
-# $Id: Makefile,v 1.9 2002-03-28 15:47:36 jthorn Exp $
-#
-# This Makefile can be called either as part of a Cactus build
-# (in which case it expects the usual Cactus Makefile variables to be
-# set), or directly from the command line (in which case it provides
-# default values for some variables).
-#
-# Arguments:
-# SRCDIR = Directory where the source code lives. Default is .
-# if variable isn't set from command line or environment.
-# CC, CXX = C and C++ compilers. Defaults are gcc and g++ if
-# variables aren't set from command line or environment.
-# CC_FLAGS, CXX_FLAGS = C++ compiler flags. Defaults are
-# $(STD_GCC_FLAGS) -I.. -g
-# and
-# $(STD_GXX_FLAGS) -I.. -g
-# if variables aren't set from command line or
-# environment.
-#
-# Targets:
-# cg ==> run Maple to regenerate any machine-generated
-# code in this directory
-# lib ==> build `basename $cwd`.a in the current
-# directory from all source files except test*
-# test ==> build test programs
-# clean ==> delete object files, test drivers
-# superclean ==> delete object files, test drivers, !library!
-#
-# Bugs:
-# - Dependencies on *.hh are omitted.
-#
-
-###############################################################################
-
-#
-# defaults if we're not called as part of a Cactus build
-#
-
-ifndef SRCDIR
-SRCDIR := .
-endif
-
-# these variables have defaults provided by Make itself, so instead of
-# "isn't set from command line or environment", we really just want
-# "has the default definition"
-ifeq ($(origin CC),default)
-CC := gcc
-endif
-ifeq ($(origin CXX),default)
-CXX := g++
-endif
-
-ifndef CFLAGS
-CFLAGS := $(STD_GCC_FLAGS) -I.. -g
-endif
-ifndef CXXFLAGS
-CXXFLAGS := $(STD_GXX_FLAGS) -I.. -g
-endif
-
-################################################################################
-
-# note '%' = wildcard character for $(filter-out ...)
-# but '*' = wildcard character for shell used by $(wildcard ...)
-CWD := $(shell pwd)
-LIB := $(notdir $(CWD)).a
-LIB_CFILES := $(filter-out $(SRCDIR)/test%, $(wildcard $(SRCDIR)/*.c))
-LIB_CCFILES := $(filter-out $(SRCDIR)/test%, $(wildcard $(SRCDIR)/*.cc))
-LIB_OFILES := $(LIB_CFILES:.c=.o) $(LIB_CCFILES:.cc=.o)
-
-TEST_CCFILES := $(wildcard test*.cc)
-TEST_BINARIES := $(TEST_CCFILES:.cc=)
-
-###############################################################################
-
-.PHONY : lib
-lib : $(LIB)
-$(LIB) : $(LIB_OFILES)
- ar -rv $@ $^
- ranlib $@
-
-$(LIB_CFILES:.c=.o) : %.o : %.c
- $(CC) $(CFLAGS) -c -o $@ $<
-
-$(LIB_CCFILES:.cc=.o) : %.o : %.cc
- $(CXX) $(CXXFLAGS) -c -o $@ $<
-
-.PHONY : test
-test : $(TEST_BINARIES)
-$(TEST_BINARIES): %: %.cc $(LIB) -lm
- $(CXX) $(CXXFLAGS) -o $@ $^
-
-.PHONY : cg
-cg :
- maple <doit.maple | tee maple.log
-
-.PHONY : clean
-clean :
- -rm -f *.o $(TEST_BINARIES)
-
-.PHONY : superclean
-superclean : clean
- -rm -f $(LIB)
diff --git a/src/jtutil/make.code.defn b/src/jtutil/make.code.defn
new file mode 100644
index 0000000..94445b3
--- /dev/null
+++ b/src/jtutil/make.code.defn
@@ -0,0 +1,8 @@
+# Main make.code.defn file for thorn AHFinderDirect
+# $Header$
+
+# Source files in this directory
+SRCS = array.cc cpm_map.cc fuzzy.cc linear_map.cc miscfp.cc norm.cc round.cc
+
+# Subdirectories containing source files
+SUBDIRS =
diff --git a/src/jtutil/makefile b/src/jtutil/makefile
new file mode 100644
index 0000000..370ca97
--- /dev/null
+++ b/src/jtutil/makefile
@@ -0,0 +1,45 @@
+# Makefile for standalone test drivers in this directory
+# $Id: makefile,v 1.1 2002-04-05 17:42:11 jthorn Exp $
+#
+# CC, CXX = C and C++ compilers. Defaults are gcc and g++ if
+# variables aren't set from command line or environment.
+# CC_FLAGS, CXX_FLAGS = C++ compiler flags. Defaults are
+# $(STD_GCC_FLAGS) -I.. -g
+# and
+# $(STD_GXX_FLAGS) -I.. -g
+# if variables aren't set from command line or
+# environment.
+#
+# Targets:
+# test ==> build test programs
+# clean ==> delete object files, test drivers
+# superclean ==> delete object files, test drivers
+#
+# Bugs:
+# - Dependencies on *.hh are omitted.
+#
+
+CXX := g++
+CFLAGS := $(STD_GCC_FLAGS) -I.. -g
+CXXFLAGS := $(STD_GXX_FLAGS) -I.. -g
+
+################################################################################
+
+test : test_array \
+ test_cpm_map test_linear_map \
+ test_fuzzy test_round \
+ test_modulo test_norm
+
+test_array : test_array.o array.o \
+ fuzzy.o round.o -lm
+test_cpm_map : test_cpm_map.o cpm_map.o \
+ fuzzy.o round.o error_exit.o -lm
+test_linear_map : test_linear_map.o linear_map.o \
+ fuzzy.o round.o error_exit.o -lm
+test_fuzzy : test_fuzzy.o fuzzy.o \
+ round.o error_exit.o
+test_round : test_round.o round.o
+test_modulo : test_modulo.o miscfp.o \
+ fuzzy.o round.o error_exit.o -lm
+test_norm : test_norm.o norm.o \
+ fuzzy.o round.o -lm