| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- #
- # Makefile for XML reader.
- #
- #----------------------------------------------
- # settings
- #----------------------------------------------
- # basename of xml type etc:
- basename = standard_name_table
- # test code:
- test = $(basename)-test
- #----------------------------------------------
- # compiler
- #----------------------------------------------
- FC = gfortran
- FFLAGS = -fbounds-check
- LDFLAGS =
- #----------------------------------------------
- # libraries
- #----------------------------------------------
- INCS = -I${XMLF_HOME}/include
- LIBS = -L${XMLF_HOME}/lib -lxmlf
- #----------------------------------------------
- # rules
- #----------------------------------------------
- %.o: %.F90
- $(FC) -c $(FFLAGS) $(INCS) $<
- %.o: %.f90
- $(FC) -c $(FFLAGS) $(INCS) $<
- #----------------------------------------------
- # targets
- #----------------------------------------------
- help:
- @echo ""
- @echo " Usage:"
- @echo " make $(basename).f90"
- @echo " make $(test).x"
- @echo " make clean"
- @echo ""
- #----------------------------------------------
- # targets
- #----------------------------------------------
- # * reader module
- $(basename).f90: $(basename).xml
- xmlf-make-reader $(basename).xml
- # * test program
- $(basename).o: $(basename).f90
- $(test).o: $(test).F90 $(basename).o
- objs = $(test).o $(basename).o
- $(test).x: $(test).o
- $(FC) -o $@ $(LDFLAGS) $(objs) $(LIBS)
- # * clean
- clean:
- /bin/rm -f *.o *.mod *.x
- /bin/rm -f $(basename).f90
|