Auto-generated MMS

From VSI OpenVMS Wiki
(Redirected from Auto-generating MMS)
Jump to: navigation, search

The default MMS file generated by VMS-IDE: Create MMS command includes the following operations:

  1. Collect the list of header files
  2. Collect the list of source files
  3. Add header files list as INCLUDES
  4. Add source files list as SOURCES
  5. Define the main target depending on the project type
  6. Define object dependencies
NOTE: For some languages the compilation order is important. To change the order in which objects are compiled, reorder the object files in the main target definition.
NOTE: Variables DEBUG, OUTDIR and CONFIG will be defined by the VMS IDE extension during compilation.

Example

! header                                                                      !auto
! Do not modify this file. It may be overwritten automatically.               !auto
! includes                                                                    !auto
INCLUDES=                                                                     !auto
! sources                                                                     !auto
SOURCES= -                                                                    !auto
myprog.cob                                                                    !auto
! dependencies                                                                !auto
.FIRST                                                                        !auto
                                                                              !auto
! compiler/linker options                                                     !auto
.IF DEBUG                                                                     !auto
COMPILEFLAGS = /DEBUG/NOOP/LIST=$(MMS$TARGET_NAME)/OBJECT=$(MMS$TARGET)       !auto
LINKFLAGS = /DEBUG/MAP=$(MMS$TARGET_NAME)/EXECUTABLE=$(MMS$TARGET)            !auto
.ELSE                                                                         !auto
COMPILEFLAGS = /OBJECT=$(MMS$TARGET)                                          !auto
LINKFLAGS = /EXECUTABLE=$(MMS$TARGET)                                         !auto
.ENDIF                                                                        !auto
! directives                                                                  !auto
.SILENT                                                                       !auto
OUT_DIR = .$(OUTDIR).$(CONFIG)                                                !auto
OBJ_DIR = $(OUT_DIR).obj                                                      !auto
.SUFFIXES                                                                     !auto
.SUFFIXES .OBJ .CPP .C .CLD .MSG .BLI .COB .PAS .BAS .F77 .F90 .FOR .B32 .CBL !auto
.CPP.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    $(CXX) $(COMPILEFLAGS) $(MMS$SOURCE)                                      !auto
                                                                              !auto
.C.OBJ                                                                        !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    $(CC) $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.CLD.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    SET COMMAND/OBJECT=$(MMS$TARGET) $(MMS$SOURCE)                            !auto
                                                                              !auto
.MSG.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    MESSAGE /OBJECT=$(MMS$TARGET) $(MMS$SOURCE)                               !auto
                                                                              !auto
.BLI.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    BLISS $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.B32.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    BLISS $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.COB.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    COBOL $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.CBL.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    COBOL $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.PAS.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    PASCAL $(COMPILEFLAGS) $(MMS$SOURCE)                                      !auto
                                                                              !auto
.BAS.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    BASIC $(COMPILEFLAGS) $(MMS$SOURCE)                                       !auto
                                                                              !auto
.F77.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    FORTRAN $(COMPILEFLAGS) $(MMS$SOURCE)                                     !auto
                                                                              !auto
.F90.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    FORTRAN $(COMPILEFLAGS) $(MMS$SOURCE)                                     !auto
                                                                              !auto
.FOR.OBJ                                                                      !auto
    pipe create/dir $(DIR $(MMS$TARGET)) | copy SYS$INPUT nl:                 !auto
    FORTRAN $(COMPILEFLAGS) $(MMS$SOURCE)                                     !auto
                                                                              !auto
.DEFAULT                                                                      !auto
    ! Source $(MMS$TARGET) not yet added                                      !auto
                                                                              !auto
! main target                                                                 !auto
[$(OUT_DIR)]$(NAME).EXE :  -                                                  !auto
[$(OBJ_DIR)]myprog.obj                                                        !auto
    CXXLINK $(LINKFLAGS) $(MMS$SOURCE_LIST)                                   !auto
                                                                              !auto
! objects                                                                     !auto
[$(OBJ_DIR)]myprog.obj : myprog.cob $(INCLUDES)                               !auto