DRMS Module Compilation

This note describes how to compile and link DRMS pipeline modules using "make".

A sample makefile is included below. For the first usage the only files necessary in the directory where 'make' will be run are the "makefile" itself and the module source code ".c" file. All the needed working directories will be made by make. The connection to the JSOC DRMS environment is through the include file on the first active line of the makefile. The relative path must resolve to the root JSOC directory you have established (see e.g. CvsInit). The module source file with the ".c" omitted should be listed instead of "my_new_prog" on the "MODEXE" line. The relative path for "make.mk" and the correct name for "my_new_prog" are the only changes that should be needed before simply invoking "make" with no arguments. Note the warning to run "configure" on the machine where you will do the compilation.

At the moment it is a good idea to compile on the Stanford machines n00, n12, or lws for linux_ia32, linux_x86_64, or linux_ia64 respectively.

The following is the contents of the basic file to be named "Makefile" in the same directory as your "my_new_prog.c"

##### Makefile for DRMS pipeline modules *****

# run ./configure in your jsoc root directory before running this script 
# for the first time on each machine

# The next line should fetch the "make.mk" file in your top level jsoc directory

include ../../make.mk

# Run "make" with no arguments, it will make executables for all
# modules listed in the "MODEXE line below.
# this makefile and the matching source files are the only files
# needed in the directory the first time "make" is called.

################### Targets ######################
# Main programs for JSOC modules.

# The next line should list the programs to make
# There should be a matching ".c" file for each program.
MODEXE = my_new_prog

##### Nothing below this line should need changing ######

##### Directory specific make rules                ######
include $(MKROOT)/make_lib.mk
# Cleanup rules
include $(MKROOT)/make_clean.mk
# Directory specific configure rule:
configure:

.PHONY: configure
# Include automatically generated dependencies on .h files.
-include make_dep.mk

JsocWiki: DrmsMakeModule (last edited 2013-05-01 04:35:26 by localhost)