mirror of
https://gitlab.com/scemama/irpf90.git
synced 2025-01-03 01:55:42 +01:00
Works with ninja and irpf90.a
This commit is contained in:
parent
452b20c40b
commit
309507d67a
@ -46,9 +46,11 @@ def create():
|
|||||||
return
|
return
|
||||||
file = open(FILENAME,"w")
|
file = open(FILENAME,"w")
|
||||||
t = """IRPF90 = irpf90 #-a -d
|
t = """IRPF90 = irpf90 #-a -d
|
||||||
NINJA = ninja
|
|
||||||
FC = gfortran
|
FC = gfortran
|
||||||
FCFLAGS= -O2 -ffree-line-length-none -I .
|
FCFLAGS= -O2 -ffree-line-length-none -I .
|
||||||
|
NINJA = ninja
|
||||||
|
AR = ar
|
||||||
|
RANLIB = ranlib
|
||||||
|
|
||||||
SRC=
|
SRC=
|
||||||
OBJ=
|
OBJ=
|
||||||
@ -134,21 +136,21 @@ def run_make():
|
|||||||
print >>file, "ALL_OBJ1 = $(patsubst %%, %s%%,$(notdir $(ALL_OBJ)))"%(irpdir)
|
print >>file, "ALL_OBJ1 = $(patsubst %%, %s%%,$(notdir $(ALL_OBJ)))"%(irpdir)
|
||||||
print >>file, "all:$(ALL)"
|
print >>file, "all:$(ALL)"
|
||||||
print >>file, "\t@$(MAKE) -s move"
|
print >>file, "\t@$(MAKE) -s move"
|
||||||
print >>file, "ifdef USE_IRPF90_A"
|
# print >>file, "ifdef USE_IRPF90_A"
|
||||||
for m in mod:
|
for m in mod:
|
||||||
if m.is_main:
|
if m.is_main:
|
||||||
exe = m.filename
|
exe = m.filename
|
||||||
print >>file, "%s: %s%s.irp.o %s%s.irp.module.o irpf90.a"%(exe,irpdir,exe,irpdir,exe)
|
print >>file, "%s: %s%s.irp.o %s%s.irp.module.o IRPF90_temp/irpf90.a"%(exe,irpdir,exe,irpdir,exe)
|
||||||
print >>file, "\t$(FC) -o $@ %s$@.irp.o %s$@.irp.module.o irpf90.a $(LIB)"%(irpdir,irpdir)
|
print >>file, "\t$(FC) -o $@ %s$@.irp.o %s$@.irp.module.o IRPF90_temp/irpf90.a $(LIB)"%(irpdir,irpdir)
|
||||||
print >>file, "\t@$(MAKE) -s move"
|
print >>file, "\t@$(MAKE) -s move"
|
||||||
print >>file, "else"
|
# print >>file, "else"
|
||||||
for m in mod:
|
# for m in mod:
|
||||||
if m.is_main:
|
# if m.is_main:
|
||||||
exe = m.filename
|
# exe = m.filename
|
||||||
print >>file, "%s: %s%s.irp.o %s%s.irp.module.o $(OBJ1)"%(exe,irpdir,exe,irpdir,exe)
|
# print >>file, "%s: %s%s.irp.o %s%s.irp.module.o $(OBJ1)"%(exe,irpdir,exe,irpdir,exe)
|
||||||
print >>file, "\t$(FC) -o $@ %s$@.irp.o %s$@.irp.module.o $(OBJ1) $(LIB)"%(irpdir,irpdir)
|
# print >>file, "\t$(FC) -o $@ %s$@.irp.o %s$@.irp.module.o $(OBJ1) $(LIB)"%(irpdir,irpdir)
|
||||||
print >>file, "\t@$(MAKE) -s move"
|
# print >>file, "\t@$(MAKE) -s move"
|
||||||
print >>file, "endif"
|
# print >>file, "endif"
|
||||||
|
|
||||||
buffer = ""
|
buffer = ""
|
||||||
for m in mod:
|
for m in mod:
|
||||||
@ -186,8 +188,8 @@ def run_make():
|
|||||||
print >>file, dir+"%.o: %.F\n\t$(FC) $(FCFLAGS) -c $*.F -o "+dir+"$*.o"
|
print >>file, dir+"%.o: %.F\n\t$(FC) $(FCFLAGS) -c $*.F -o "+dir+"$*.o"
|
||||||
print >>file, dir+"%.irp.F90: "+IRPF90_MAKE+"\n"
|
print >>file, dir+"%.irp.F90: "+IRPF90_MAKE+"\n"
|
||||||
print >>file, "move:\n\t@mv -f *.mod IRPF90_temp/ 2> /dev/null | DO_NOTHING=\n"
|
print >>file, "move:\n\t@mv -f *.mod IRPF90_temp/ 2> /dev/null | DO_NOTHING=\n"
|
||||||
print >>file, "irpf90.a: $(OBJ) $(OBJ1)\n\t$(AR) crf irpf90.a $(OBJ1)\n"
|
print >>file, "IRPF90_temp/irpf90.a: $(OBJ) $(OBJ1)\n\t$(AR) crf IRPF90_temp/irpf90.a $(OBJ1)\n"
|
||||||
print >>file, "clean:\n\trm -rf $(EXE) $(OBJ1) irpf90.a $(ALL_OBJ1) $(ALL)\n"
|
print >>file, "clean:\n\trm -rf $(EXE) $(OBJ1) IRPF90_temp/irpf90.a $(ALL_OBJ1) $(ALL)\n"
|
||||||
print >>file, "veryclean:\n\t- $(MAKE) clean\n"
|
print >>file, "veryclean:\n\t- $(MAKE) clean\n"
|
||||||
print >>file, "\t- rm -rf "+irpdir+" "+mandir+" "+IRPF90_MAKE+" irpf90_entities dist tags\n"
|
print >>file, "\t- rm -rf "+irpdir+" "+mandir+" "+IRPF90_MAKE+" irpf90_entities dist tags\n"
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ def run():
|
|||||||
f.write('\n\n'.join(output))
|
f.write('\n\n'.join(output))
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
|
|
||||||
create_irpf90_make([ x.filename for x in l_targets ])
|
create_irpf90_make([ x.filename for x in l_targets ] + [ os.path.join(irpdir,'irpf90.a') ] )
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user