# recipes # deal with WATCOM (DOS/Win) and Unix compiler commandline differences # WATCOM deals with includes via the FINCLUDE env variable # and now the -INCP=inc_filepath1;inc_filepath2 # (note ";" affects psh - haven't tried to fix that yet since I am only using one inc_filepath right now) # It may also not deal correctly with searching the "local" (source) directory # correctly though like the "-I$(dir $<) does for the Unix compiler. # (note that I have not tried to address this yet either) # But, we shouldn't have any local includes in the source directories # for WEPS anyway. # building executable files (must put this macro before recipes listed below) .IF $(OS) == UNIX .IF $(DEBUG) MAKE_EXE = $(LD) $(LD_IFLAGS) $(LD_FLAGS) $(LD_DFLAGS) $< -o $@ .ELIF $(OPT) MAKE_EXE = $(LD) $(LD_IFLAGS) $(LD_FLAGS) $(LD_OFLAGS) $< -o $@ .ELSE MAKE_EXE = $(LD) $(LD_IFLAGS) $(LD_FLAGS) $< -o $@ .END .ELSE .IF $(DEBUG) MAKE_EXE = $(LD) $(LD_IFLAGS) $(LD_FLAGS) \ @$(mktmp,link.wcm \n\ $(LD_DFLAGS) \n\ name $(@:s,/,\,) \n\ file $(<:s; ;,;) \n\ ) .ELIF $(OPT) MAKE_EXE = $(LD) $(LD_IFLAGS) $(LD_FLAGS) \ @$(mktmp,link.wcm \n\ $(LD_OFLAGS) \n\ name $(@:s,/,\,) \n\ file $(<:s; ;,;) \n\ ) .ELSE MAKE_EXE = $(LD) $(LD_IFLAGS) $(LD_FLAGS) \ @$(mktmp,link.wcm \n\ name $(@:s,/,\\,) \n\ file $(<:s; ;,;) \n\ ) .END .END # building library files (must put this macro before recipes listed below) MAKE_LIB = $(AR) $(AR_FLAGS) $@ $^ # building object files .IF $(OS) == UNIX %$(O):%$(F) .IF $(DEBUG) $(FC) $(FC_IFLAGS) $(FC_FLAGS) $(FC_DFLAGS) -c $< -o $@ .ELIF $(OPT) $(FC) $(FC_IFLAGS) $(FC_FLAGS) $(FC_OFLAGS) -c $< -o $@ .ELSE $(FC) $(FC_IFLAGS) $(FC_FLAGS) -c $< -o $@ .END .ELSE %$(O):%$(F) .IF $(DEBUG) $(FC) $(FC_IFLAGS) $(FC_FLAGS) $(FC_DFLAGS) $< -FO=$(@:d:s,/,\,) .ELIF $(OPT) $(FC) $(FC_IFLAGS) $(FC_FLAGS) $(FC_OFLAGS) $< -FO=$(@:d:s,/,\,) .ELSE $(FC) "$(FC_IFLAGS)" $(FC_FLAGS) $< "-FO=$(@:d:s,/,\,) " .END .END