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:
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.
25 # RULES for building one or more unit test programs.
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
) ;\
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.
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.
63 @
/bin
/rm -f
*.o core so_locations Makefile.bak
*~
#*#
65 @for o in
$(MAIN_OBJS
); do \
66 p
=`basename $$o '.o'` ; \
71 # RULES for creating the include dependencies.
74 include $(BUILD_DIR
)/depend_rules.mk
76 clean_depend
: generic_clean_depend
78 depend
: generic_depend