mirror of
https://gitlab.com/scemama/irpf90.git
synced 2024-12-21 20:03:33 +01:00
Fixed ar for MacOS
This commit is contained in:
parent
cc61d6271b
commit
bccb9adbe6
@ -35,6 +35,15 @@ FILENAME = "Makefile"
|
||||
FILENAME_GITIGNORE = ".gitignore"
|
||||
IRPF90_MAKE = "irpf90.make"
|
||||
|
||||
if sys.platform in ["linux", "linux2"]:
|
||||
AR = "ar crs"
|
||||
elif sys.platform == "darwin":
|
||||
AR = "libtool -static -o"
|
||||
else:
|
||||
print("Unknown platform. Only Linux and Darwin are supported.")
|
||||
sys.exit(-1)
|
||||
|
||||
|
||||
######################################################################
|
||||
def create():
|
||||
has_makefile = True
|
||||
@ -49,7 +58,7 @@ def create():
|
||||
FC = gfortran
|
||||
FCFLAGS= -O2 -ffree-line-length-none -I .
|
||||
NINJA = ninja
|
||||
AR = ar
|
||||
AR = %s
|
||||
RANLIB = ranlib
|
||||
|
||||
SRC=
|
||||
@ -61,7 +70,7 @@ export
|
||||
|
||||
%s: $(filter-out %s%%, $(wildcard */*.irp.f)) $(wildcard *.irp.f) $(wildcard *.inc.f) Makefile
|
||||
\t$(IRPF90)
|
||||
"""%(IRPF90_MAKE,IRPF90_MAKE,irpdir)
|
||||
"""%(AR,IRPF90_MAKE,IRPF90_MAKE,irpdir)
|
||||
file.write(t)
|
||||
file.close()
|
||||
create_gitignore()
|
||||
@ -188,7 +197,7 @@ def run_make():
|
||||
print(dir+"%.o: %.F\n\t$(FC) $(FCFLAGS) -c $*.F -o "+dir+"$*.o", file=file)
|
||||
print(dir+"%.irp.F90: "+IRPF90_MAKE+"\n", file=file)
|
||||
print("move:\n\t@mv -f *.mod IRPF90_temp/ 2> /dev/null | DO_NOTHING=\n", file=file)
|
||||
print("IRPF90_temp/irpf90.a: $(OBJ) $(OBJ1)\n\t$(AR) crf IRPF90_temp/irpf90.a $(OBJ1)\n", file=file)
|
||||
print("IRPF90_temp/irpf90.a: $(OBJ) $(OBJ1)\n\t$(AR) IRPF90_temp/irpf90.a $(OBJ1)\n", file=file)
|
||||
print("clean:\n\trm -rf $(EXE) $(OBJ1) IRPF90_temp/irpf90.a $(ALL_OBJ1) $(ALL)\n", file=file)
|
||||
print("veryclean:\n\t- $(MAKE) clean\n", file=file)
|
||||
print("\t- rm -rf "+irpdir+" "+mandir+" "+IRPF90_MAKE+" irpf90_entities dist tags\n", file=file)
|
||||
|
Loading…
Reference in New Issue
Block a user