Makefile mit mehreren Zielen
Hoffentlich ist das eine sehr einfache Frage. Ich habe eine Makefile-Musterregel, die so aussieht:
%.so : %.f %.pyf
f2py -c -L${LAPACK_DIR} ${GRASPLIBS} -m $* $^ ${SOURCES} --opt='-02' --f77flags='-fcray-pointer' >> silent.txt
Ich möchte, dass das Makefile eine Reihe von .so-Dateien erstellt. Deshalb habe ich versucht, zwei Dateien (radgrd_py.so und lodiso_py.so) daraus zu erstellen:
radgrd_py.so lodiso_py.so:
%.so : %.f %.pyf
f2py -c -L${LAPACK_DIR} ${GRASPLIBS} -m $* $^ ${SOURCES} --opt='-02' --f77flags='-fcray-pointer' >> silent.txt
und versuchte es dann so:
radgrd_py.so:
lodiso_py.so:
%.so : %.f %.pyf
f2py -c -L${LAPACK_DIR} ${GRASPLIBS} -m $* $^ ${SOURCES} --opt='-02' --f77flags='-fcray-pointer' >> silent.txt
Aber in jedem Fall wird nur das erste von mir angegebene Ziel erstellt. Wenn ich 'make radgrd_py.so' ausführe, funktioniert es einwandfrei. Ich bin mir nur nicht sicher, wie ich eine Liste der zu erstellenden Dateien angeben soll, damit ich einfach 'make' ausführen kann.