ソースを参照

Fix min-dgels using another compiler than cc+ld

Samuel Thibault 7 年 前
コミット
b3231c7c4c
共有2 個のファイルを変更した7 個の追加4 個の削除を含む
  1. 5 2
      min-dgels/Makefile.in
  2. 2 2
      min-dgels/base/F2CLIBS/libf2c/Makefile

+ 5 - 2
min-dgels/Makefile.in

@@ -1,10 +1,13 @@
+CC = @CC@
+LD = @LD@
+
 CLAPACK=base
 ADDITIONAL=additional
 
 all:
 	mkdir -p build
-	cd $(CLAPACK) && $(MAKE) blaslib
-	cd $(CLAPACK) && $(MAKE) f2clib
+	cd $(CLAPACK) && $(MAKE) blaslib CC="$(CC)" LD="$(LD)"
+	cd $(CLAPACK) && $(MAKE) f2clib CC="$(CC)" LD="$(LD)"
 	cd $(ADDITIONAL) && $(CC) -c -fPIC *.c && ar cr ../build/minlibdgels.a *.o && ranlib ../build/minlibdgels.a
 
 install:

+ 2 - 2
min-dgels/base/F2CLIBS/libf2c/Makefile

@@ -21,7 +21,7 @@ include $(TOPDIR)/make.inc
 # compile, then strip unnecessary symbols
 .c.o:
 	$(CC) -c -DSkip_f2c_Undefs $(CFLAGS) $*.c
-	ld -r -x -o $*.xxx $*.o
+	$(LD) -r -x -o $*.xxx $*.o
 	mv $*.xxx $*.o
 ## Under Solaris (and other systems that do not understand ld -x),
 ## omit -x in the ld line above.
@@ -83,7 +83,7 @@ libminf2c.a: $(OFILES)
 ## of "cc -shared".
 
 libf2c.so: $(OFILES)
-	cc -shared -o libf2c.so $(OFILES)
+	$(CC) -shared -o libf2c.so $(OFILES)
 
 ### If your system lacks ranlib, you don't need it; see README.