add hint to Make2
[gnucap-felix.git] / main / configure
blob52ca1d586d2ebd9c643143f6d75b7ba7b2d8f6ad
1 #!/bin/sh
2 # configure for executable
4 mkdir -p O
5 #------------- Stuff added to enable --prefix --------------
6 if test "x$1" != "x"; then
7 # echo Found input parameter -- $1
8 # Now see if the parameter is --prefix=
9 if test "x${1#--prefix=}" != "x$1"; then
10 # echo "Found --prefix in input args. Setting prefix directory."
11 prefix=${1#--prefix=}
12 else
13 # echo "Found unrecognized parameter in input args."
14 # Just use the default prefix dir.
15 prefix=/usr/local
18 else
19 # echo "No input parameter found."
20 # Just use the default prefix dir
21 prefix=/usr/local
24 sed -e "s#/usr/local#$prefix#" ../Makefile.template > Makefile
26 #----------------------------------------------------------------
27 echo "CCFLAGS = \\" >Make.ccflags
28 echo "-DUNIX -O2 -DNDEBUG -I. -I../include -I../../include -W" >>Make.ccflags
30 echo "LIBS = \\" >Make.libs
31 echo "-lgnucap \\" >>Make.libs
32 echo "" >>Make.libs
33 echo "PREFIX = " $prefix >>Make.libs
34 echo "" >>Make.libs
36 cat <<CAT_EOF >Make.sys
37 #------------------------------------------------------------------------
38 VPATH = .:..
39 CCC = g++
40 TARGET_EXT =
42 LDFLAGS = -rdynamic \
43 -L../../lib/O
45 .SUFFIXES : .o .cc
46 .cc.o:; \$(CCC) \$(CCFLAGS) -c \$<
47 #------------------------------------------------------------------------
48 \$(TARGET): \$(OBJS)
49 rm -f \$@
50 \$(CCC) \$(CCFLAGS) \$(OBJS) -o \$@ \$(LIBS) \$(LDFLAGS)
51 #------------------------------------------------------------------------
52 CAT_EOF
54 echo \# created by main/configure. do not edit >Make2
55 echo \#------------------------------------------------------------------------ >>Make2
56 cat Make.ccflags Make.libs Make.sys >>Make2
57 rm Make.ccflags Make.libs Make.sys
59 exit 0