The ASC ACEware level 1 library does a great job of providing a interface to the level 1.1 data. However, I feel it places a burden on the applications programmer regarding the number of header files and libraries that must be kept track of. This results in more complex C code and especially makefiles. The problem is increased by the fact that the libraries are stored in non-standard locations (given in the $ACE_WARE environment variable).
For example, a typical C program might require the following:
#include "hdfi.h" #include "cris.h" #include "crisGetData.h" #include "utilities.h" #include "getEvents_c.h"and the corresponding makefile would look like this:
INCLUDE_DIR = $(ACE_WARE)/include LIBRARY_DIR = $(ACE_WARE)/lib INCLUDE_HEADER_DIRS = -I$(INCLUDE_DIR)/hdf \ -I$(INCLUDE_DIR)/structures \ -I$(INCLUDE_DIR)/level1/prototype \ -I$(INCLUDE_DIR)/level1 \ -I$(INCLUDE_DIR)/level1_1/prototype/cris \ -I$(INCLUDE_DIR)/level1_1/prototype/ace INCLUDE_LIB_DIRS = -L$(LIBRARY_DIR) INCLUDE_LIBRARIES = -llevel1_1 -lCrisGetData -lUtilities
#include <L1.h>and to link with a simple -lL1.
It turned out not to be difficult to accomplish this. It requires no changes to any of the files in the ASC ACEware distribution. To make the header file, all the separate ASC header files are concatenated (a little care has to be taken to make sure this is done in the correct order) and all the object (.o) files are archived into one big library. All this is taken care of by the makefile in one of the steps below.
The step-by-step process is as follows:
Now you should have the files $ACE_WARE/lib/libL1.a and $ACE_WARE/include/L1.h with symlinks to them in /usr/local/lib and /usr/local/include.
A couple notes: I only provide this solution for the level1 and level1_1 libraries, not for asc, hdf, or level0. Furthermore, when Robert or Bruce make changes to these libraries, then this Makefile may also have to change. I hope to be able to keep up with any changes they make.
The latest version of the Makefile is 1.2. It works with
Marty Olevitch