initial version of wrf+fire code given by Ned Patton at NCAR.
[wrffire.git] / wrfv2_fire / external / io_grib_share / build / utest_rules.mk
blobe05368e3fc842004cd98ab3c7168c0eb4abeba72
1 #------------------------------------------------------------------------------
2 # Make rules for building one or more unit test programs. These are used to
3 # test library modules.
5 # This file is intended for use in Makefile via the include directive, e.g.
7 # include $(BUILD_DIR)/utest_rules.mk
9 # It is assumed that the environment has been set by sourcing the build
10 # resource file (buildrc).
12 # This file defines the following rules for library modules:
14 # all, exe
16 # Copyright (C) 2001, WSI Corporation
17 #------------------------------------------------------------------------------
19 # For portability, use the Bourne shell within Makefiles.
20 # There have been problems using the C-shell under Linux.
22 SHELL=/bin/sh
25 # RULES for building one or more unit test programs.
27 all: exe
28 exe: utest
30 utest: $(MAIN_OBJS)
31 @for o in $(MAIN_OBJS); do \
32 p=`basename $$o '.o'` ; \
33 echo " Building test program $$p..." ; \
34 echo "$(LDD) $(DEBUG) $(OPTIMIZE) -o $$p $$o $(DEP_LIBS)" ;\
35 $(LDD) $(DEBUG) $(OPTIMIZE) -o $$p $$o $(DEP_LIBS) ;\
36 done
39 # Include the RULES for compilation.
41 include $(BUILD_DIR)/compile_rules.mk
44 # RULE for building a library
46 # For exe modules, these do nothing, but we define one so that make lib
47 # can be passed down to all source directories.
49 lib:
50 @echo "make lib does nothing for unit test modules"
53 # RULES for cleaning up derived files.
55 # 'clean' removes all objects produced by this file, as well as other
56 # extraneous artifacts of compiling and building libraries.
58 # A subsequent make will both recompile the source code and recreate
59 # the executable. clean also removes files core files and other
60 # auxilliary files created during compilation.
62 clean:
63 @/bin/rm -f *.o core so_locations Makefile.bak *~ #*#
64 @/bin/rm -fr ii_files
65 @for o in $(MAIN_OBJS); do \
66 p=`basename $$o '.o'` ; \
67 rm -f $$p;\
68 done
71 # RULES for creating the include dependencies.
73 OBJS=$(MAIN_OBJS)
74 include $(BUILD_DIR)/depend_rules.mk
76 clean_depend: generic_clean_depend
78 depend: generic_depend