/* Set the default PRIMARY_TARGET (WEPS) directory structure here */ #if [matches tsterode [command-line-goals]] PRIMARY_TARGET = tsterode; /* Primary target of build (tsterode) */ #elif [matches tsthydro [command-line-goals]] PRIMARY_TARGET = tsthydro; /* Primary target of build (tsthydro) */ #else PRIMARY_TARGET = weps; /* Primary target of build (weps) */ #endif #ifndef TARGET_BIN TARGET_BIN = bin; /* Primary target (weps) default "bin" (relative) path/name */ #endif #ifndef TARGET_INC TARGET_INC = inc; /* Primary target (weps) default include (relative) path */ #endif BIN = [TARGET_BIN]; INC = [TARGET_INC]; /* check if any commandline macros have been defined */ #ifndef OPT OPT = 0; #endif #ifndef DEBUG DEBUG = 0; #endif #ifndef RELEASE RELEASE = 0; #endif /* Note: No suffixes in dir names are currently allowed, ie: (dir1.src and dir2/dir1.abc not allowed) Note: Directory names currently must be unique, ie: (both dir1 and dir2/dir1 not allowed) */ #include "cookbook/compiler.weps" /* determine host/compiler */ /* list all PRIMARY_TARGET src directories */ #if [matches tsterode [command-line-goals]] src_dirs = erosion/test erosion util/date util/misc; #elif [matches tsthydro [command-line-goals]] src_dirs = hydro/test hydro crop util/date util/misc util/unix main; #else /* weps */ src_dirs = crop decomp hydro main manage mproc soil erosion; src_dirs += asd util/date util/math util/misc util/odepack; #endif #if [matches lf95 [FC]] src_dirs += util/nt; #else src_dirs += util/unix; #endif #ifdef RELEASE src_dirs += util/build; /* Use modified functions */ #else src_dirs += util/templates; /* Use default functions */ #endif /* list possible dirs with include files beside [src_dirs] */ inc_dirs = [INC] [addprefix [INC]/ [src_dirs]]; #include "cookbook/cook.weps" #include "cookbook/recipes.weps" /* determines the correct recipe file */ #include "cookbook/recipes.dep" /* recipes for dependency files */ #include "cookbook/target.weps" show: { echo "PRIMARY_TARGET = " [PRIMARY_TARGET]; echo "FC: " [FC]; echo "src_dirs: " [src_dirs]; echo "inc_dirs: " [inc_dirs]; echo "manifest: " [manifest]; echo "src_files: " [src_files]; echo "inc_files: " [inc_files]; echo "obj_files: " [obj_files]; echo "dep_files: " [dep_files]; echo "command line variables: " [command-line-goals]; echo "OPT: " [OPT]; echo "DEBUG: " [DEBUG]; echo "RELEASE: " [RELEASE]; }