Resources

More about This Product

SAS/C

The SAS/C® Tour


Using NMAKE to build ftoc.out

The NMAKE utility can be used to build the prelinked output file ftoc.out. The Microsoft Program Maintenance Utility (NMAKE.EXE) is documented in your online documentation for Developer Studio. This example is just intended to get you started.

  1. In the directory containing your ftoc.c file, create an ftoc.mak file containing the following script:

    OUTDIR=.
    INTDIR=.
    
    ALL : "$(OUTDIR)\ftoc.out"
    
    CLEAN :
           -@erase "$(INTDIR)\ftoc.obj"
            -@erase "$(INTDIR)\ftoc.out"
    
    "$(OUTDIR)" :
        if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
    
    CPP=C:\PROGRA~1\SASINS~1\SASC701\host\wnt\bin\sascc370.exe
    CPP_PROJ=-c -v
    
    .c{$(INTDIR)}.obj::
       $(CPP) @<<
       $(CPP_PROJ) $<
    <<
     
    LINK32=C:\PROGRA~1\SASINS~1\SASC701\host\wnt\bin\sascc370.exe 
    LINK32_FLAGS=-v -o .\ftoc.out 
    LINK32_OBJS= \
           "$(INTDIR)\ftoc.obj" 
    
    "$(OUTDIR)\ftoc.out" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
        $(LINK32) @<<
      $(LINK32_FLAGS) $(LINK32_OBJS)
    <<
    
    SOURCE=.\ftoc.c
    
    "$(INTDIR)\ftoc.obj" : $(SOURCE) "$(INTDIR)"
           $(CPP) $(CPP_PROJ) $(SOURCE)
      
  2. Execute the following command to clean the output:

    NMAKE –f ftoc.mak clean
      
  3. Execute the following command to build ftoc.obj and ftoc.out:

    NMAKE –f ftoc.mak