1 | #------------------------------------------------------------------------------ |
---|
2 | # Make rules for building an application program. |
---|
3 | # |
---|
4 | # This file is intended for use in Makefile via the include directive, e.g. |
---|
5 | # |
---|
6 | # include $(BUILD_DIR)/application_rules.mk |
---|
7 | # |
---|
8 | # It is assumed that the environment has been set by sourcing the build |
---|
9 | # resource file (buildrc). |
---|
10 | # |
---|
11 | # Copyright (C) 2001, WSI Corporation |
---|
12 | #------------------------------------------------------------------------------ |
---|
13 | # |
---|
14 | # For portability, use the Bourne shell within Makefiles. |
---|
15 | # There have been problems using the C-shell under Linux. |
---|
16 | # |
---|
17 | SHELL=/bin/sh |
---|
18 | |
---|
19 | # |
---|
20 | # RULES for building one or more applications programs. |
---|
21 | # Each APPNAME is comprised of the same object files. |
---|
22 | # |
---|
23 | all: exe config |
---|
24 | |
---|
25 | exe: $(OBJS) |
---|
26 | @for p in $(APPNAMES); do \ |
---|
27 | echo "Building application program $$p..." ; \ |
---|
28 | $(LDD) $(DEBUG) $(OPTIMIZE) $(APP_DEFS) -o $$p $(OBJS) $(DEP_LIBS) ;\ |
---|
29 | mv -f $$p $(BIN_DEST) ;\ |
---|
30 | done |
---|
31 | |
---|
32 | # |
---|
33 | # Include the RULES for compilation and installation of config files. |
---|
34 | # |
---|
35 | include $(BUILD_DIR)/compile_rules.mk |
---|
36 | include $(BUILD_DIR)/config_rules.mk |
---|
37 | |
---|
38 | # |
---|
39 | # RULE for building a library |
---|
40 | # |
---|
41 | # For exe modules, these do nothing, but we define one so that make lib |
---|
42 | # can be passed down to all source directories. |
---|
43 | # |
---|
44 | lib: |
---|
45 | @echo "make lib does nothing for application modules" |
---|
46 | |
---|
47 | # |
---|
48 | # RULES for cleaning up derived files. |
---|
49 | # |
---|
50 | # 'clean' removes all objects produced by this file, as well as other |
---|
51 | # extraneous artifacts of compiling and building applications. |
---|
52 | # |
---|
53 | # A subsequent make will both recompile the source code and recreate |
---|
54 | # the executable. clean also removes files core files and other |
---|
55 | # auxilliary files created during compilation. |
---|
56 | # |
---|
57 | # 'clean_exe' removes application programs. |
---|
58 | # |
---|
59 | clean: |
---|
60 | @/bin/rm -f *.o core so_locations Makefile.bak *~ #*# |
---|
61 | @/bin/rm -fr ii_files |
---|
62 | |
---|
63 | clean_exe: |
---|
64 | @/bin/rm -f $(BIN_DEST)/$(APP_NAME) |
---|
65 | |
---|
66 | # |
---|
67 | # RULES for creating the include dependencies. |
---|
68 | # |
---|
69 | include $(BUILD_DIR)/depend_rules.mk |
---|
70 | |
---|
71 | clean_depend: generic_clean_depend |
---|
72 | |
---|
73 | depend: generic_depend |
---|
74 | |
---|