Annotation of OpenXM_contrib/pari/config/GEN_Make.SH, Revision 1.1.1.1
1.1 maekawa 1: dir=examples
2: name=Makefile.$osname-$arch
3: file=$dir/$name
4: lnfile=Makefile
5:
6: echo Extracting $file
7: rm -f $file $dir/$lnfile
8:
9: case "$runpathprefix" in
10: -R) RUNPTH="-R$runpath";;
11: *-rpath*) RUNPTH="$runpathprefix $runpath";;
12: esac
13:
14: if test -z "$DLLD"; then static=y; fi
15: case "$static" in
16: n) dft=dyn ;;
17: y) dft=sta ;;
18: esac
19:
20: cat > $file << EOT
21: # Generic Makefile for PARI programs -- $pretty
22: #
23: # This file was created by Configure. Any change made to it will be
24: # lost when Configure is run.
25: #
26: # make all will create
27: # matexp-dyn (linked dynamically with libpari)
28: # matexp-sta (linked statically)
29: # libmatexp.so (to be used by "install" under GP)
30: #
31: # Under GP: install(matexp, Gp, mexp, libmatexp.so) enables you to
32: # subsequently use mexp to call matexp (see the reference manual).
33: #
34:
35: # change this TARGET to compile your own programs
36: TARGET = matexp
37: SHELL = $make_sh
38:
39: DBGFLAGS = $DBGFLAGS $CFLAGS
40: CFLAGS = $OPTFLAGS $CFLAGS
41: #CFLAGS = \$(DBGFLAGS)
42:
43: # Various linkers use different flags to force static compilation. Choose
44: # the one which is relevant for your installation.
45: #
46: # Solaris ld (global)
47: #STATIC = -dn
48:
49: # Solaris ld (toggle: no shared object accepted until -B dynamic is seen
50: #STATIC = -B static
51:
52: # gcc
53: #STATIC = -static
54:
55: CC = $CC
56: CPPFLAGS = -I. -I$includedir
57: LD = $LD
58: LDFLAGS = $LDFLAGS
59: DLLD = $DLLD
60: DLLDFLAGS = $DLLDFLAGS
61: EXTRADLLDFLAGS = $EXTRADLLDFLAGS
62: EXTRALIBS = $LIBS
63:
64: RUNPTH = $RUNPTH
65: LIBDIR = -L$libdir
66: DLCFLAGS = $DLCFLAGS
67: LIBS = -lpari -lm
68:
69: RM = rm -f
70:
71:
72: OBJS = \$(TARGET).o
73: DYN = lib\$(TARGET).$DLSUFFIX
74: ALL = \$(TARGET)-sta \$(TARGET)-dyn \$(DYN)
75:
76: dft: \$(TARGET)-$dft
77:
78: all: \$(ALL)
79:
80: sta: \$(TARGET)-sta
81:
82: dyn: \$(TARGET)-dyn
83:
84: dynlib: \$(DYN)
85:
86: \$(DYN): \$(OBJS)
87: \$(DLLD) -o \$@ \$(DLLDFLAGS) \$(OBJS) \$(EXTRADLLDFLAGS)
88:
89: \$(TARGET)-sta: \$(OBJS)
90: \$(LD) -o \$@ \$(LDFLAGS) \$< \$(LIBDIR) \$(EXTRALIBS) \$(STATIC) \$(LIBS)
91:
92: \$(TARGET)-dyn: \$(OBJS)
93: \$(LD) -o \$@ \$(LDFLAGS) \$< \$(RUNPTH) \$(LIBDIR) \$(LIBS)
94:
95: %.o: %.c
96: \$(CC) -c \$(CFLAGS) \$(CPPFLAGS) \$<
97: clean:
98: -\$(RM) *.o \$(ALL)
99: EOT
100:
101: ( cd $dir ; $ln_s $name $lnfile )
102:
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>