source: trunk/WRF.COMMON/WRFV2/external/io_grib_share/build/utest_rules.mk @ 3553

Last change on this file since 3553 was 11, checked in by aslmd, 14 years ago

spiga@svn-planeto:ajoute le modele meso-echelle martien

File size: 2.1 KB
Line 
1#------------------------------------------------------------------------------
2#  Make rules for building one or more unit test programs.  These are used to
3#  test library modules.
4#
5#  This file is intended for use in Makefile via the include directive, e.g.
6#
7#      include $(BUILD_DIR)/utest_rules.mk
8#
9#  It is assumed that the environment has been set by sourcing the build
10#  resource file (buildrc).
11#
12#  This file defines the following rules for library modules:
13#
14#      all, exe
15#
16#  Copyright (C) 2001, WSI Corporation
17#------------------------------------------------------------------------------
18#
19#  For portability, use the Bourne shell within Makefiles.
20#  There have been problems using the C-shell under Linux.
21#
22SHELL=/bin/sh
23
24#
25#  RULES for building one or more unit test programs.
26#
27all: exe
28exe: utest
29
30utest: $(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
37
38#
39#  Include the RULES for compilation.
40#
41include $(BUILD_DIR)/compile_rules.mk
42
43#
44#  RULE for building a library
45#
46#  For exe modules, these do nothing, but we define one so that make lib
47#  can be passed down to all source directories.
48#
49lib:
50        @echo "make lib does nothing for unit test modules"
51
52#
53#  RULES for cleaning up derived files.
54#
55#  'clean' removes all objects produced by this file, as well as other
56#      extraneous artifacts of compiling and building libraries.
57#
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.
61#
62clean: 
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
69
70#
71#  RULES for creating the include dependencies.
72#
73OBJS=$(MAIN_OBJS)
74include $(BUILD_DIR)/depend_rules.mk
75
76clean_depend: generic_clean_depend
77
78depend: generic_depend
Note: See TracBrowser for help on using the repository browser.