mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@143302 d073be05-634f-4543-b044-5fe20cf6d1d6
70 lines
1.9 KiB
Diff
70 lines
1.9 KiB
Diff
--- makefile.orig 2015-12-09 21:27:35.000000000 -0500
|
|
+++ makefile 2015-12-09 21:37:23.000000000 -0500
|
|
@@ -1,30 +1,44 @@
|
|
-# this makefile is for LINUX machines only
|
|
+VERSION = 2.0.0
|
|
+
|
|
OBJS = $(addprefix OBJ/, fgmr.o iluk.o ilut.o arms2.o ilutpC.o ilutc.o \
|
|
vbiluk.o vbilut.o auxill.o PQ.o piluNEW.o indsetC.o sets.o \
|
|
MatOps.o tools.o systimer.o misc.o setblks.o svdInvC.o)
|
|
-AR = ar
|
|
+AR = libtool -o
|
|
|
|
#
|
|
-FC = gfortran
|
|
-FCFLAGS = -c -g -Wall -I./INC
|
|
-CC = gcc
|
|
-CCFLAGS = -c -g -DLINUX -Wall -O3 -I./INC
|
|
-LIB = LIB/libitsol.a
|
|
-#
|
|
+EXTRA_FLAGS = -I./INC
|
|
+
|
|
+PROJECT = itsol
|
|
+LIBNAME = lib$(PROJECT)
|
|
+STLIB = $(LIBNAME).a
|
|
+DYLIB = $(LIBNAME).$(VERSION).dylib
|
|
|
|
# clear list of default suffixes, and declare default suffixes
|
|
.SUFFIXES: .f .c .o
|
|
|
|
# default rule to make .o files from .f files
|
|
OBJ/%.o : SRC/%.f
|
|
- $(FC) $(FCFLAGS) -o $@ -c $<
|
|
+ $(FC) $(FCFLAGS) $(EXTRA_FLAGS) -o $@ -c $<
|
|
|
|
OBJ/%.o : SRC/%.c
|
|
- $(CC) $(CCFLAGS) -o $@ -c $<
|
|
+ $(CC) $(CFLAGS) $(EXTRA_FLAGS) -o $@ -c $<
|
|
|
|
#
|
|
-lib $(LIB): $(OBJS)
|
|
- $(AR) -rc $(LIB) $(OBJS)
|
|
+lib: $(OBJS)
|
|
+ $(AR) LIB/$(STLIB) $(OBJS)
|
|
+ $(FC) -dynamiclib -compatibility_version $(VERSION) -o LIB/$(DYLIB) -install_name $(PREFIX)/lib/$(DYLIB) $(LDFLAGS) $(OBJS)
|
|
+
|
|
+install: LIB/$(STLIB) LIB/$(DYLIB)
|
|
+ install -m655 -d $(DESTDIR)$(PREFIX)/lib
|
|
+ install -m644 LIB/$(STLIB) $(DESTDIR)$(PREFIX)/lib/$(STLIB)
|
|
+ install -m644 LIB/$(DYLIB) $(DESTDIR)$(PREFIX)/lib/$(DYLIB)
|
|
+ (cd $(DESTDIR)$(PREFIX)/lib; ln -s $(DYLIB) $(LIBNAME).dylib)
|
|
+ install -m655 -d $(DESTDIR)$(PREFIX)/include/itsol
|
|
+ install -m644 INC/*.h $(DESTDIR)$(PREFIX)/include/itsol
|
|
+
|
|
+# dummy for MacPorts build
|
|
+all:
|
|
+
|
|
#
|
|
clean :
|
|
rm -f ${OBJS} *~ core *.cache ${LIB} SRC/*~ SRC/*.cache
|
|
@@ -32,3 +46,9 @@
|
|
cleanall :
|
|
rm -f ${OBJS} *~ core *.cache ${LIB} SRC/*~ SRC/*.cache \
|
|
TESTS/*.o TESTS/*.ex
|
|
+
|
|
+test : testexe
|
|
+ cd TESTS && sh runall
|
|
+
|
|
+testexe :
|
|
+ $(MAKE) -C TESTS all LINKS="-L../LIB -litsol"
|