/[escript]/trunk/esys2/make/Makefile.implicit
ViewVC logotype

Contents of /trunk/esys2/make/Makefile.implicit

Parent Directory Parent Directory | Revision Log Revision Log


Revision 82 - (show annotations)
Tue Oct 26 06:53:54 2004 UTC (15 years, 10 months ago) by jgs
File size: 4895 byte(s)
Initial revision

1 # $Id$
2
3 # Implicit targets
4 # Define rules for generating/compiling each type of target file
5
6 # set flags
7 CC_INC_DIR_FLAGS := ${patsubst %, ${CC_INC_DIR_FLAG}%, ${L_SRC_DIR} ${L_INC_DIR} ${PKG_CC_INC_DIRS} ${L_EXT_INC_DIRS} ${CC_SYS_INC_DIRS}}
8 CPP_INC_DIR_FLAGS := ${patsubst %, ${CPP_INC_DIR_FLAG}%, ${L_SRC_DIR} ${L_INC_DIR} ${PKG_CPP_INC_DIRS} ${L_EXT_INC_DIRS} ${CPP_SYS_INC_DIRS}}
9 CC_DEF_FLAGS := ${patsubst %, ${CC_DEF_FLAG}%, ${L_DEFS}}
10 CPP_DEF_FLAGS := ${patsubst %, ${CPP_DEF_FLAG}%, ${L_DEFS}}
11 LD_LIB_DIR_FLAGS := ${patsubst %, ${LD_LIB_DIR_FLAG}%, ${L_EXT_LIB_DIRS} ${PKG_LD_LIB_DIRS} ${LD_SYS_LIB_DIRS}}
12 LD_LIB_FLAGS := ${patsubst %, ${LD_LIB_FLAG}%, ${L_EXT_LIBS} ${PKG_LD_LIBS} ${LD_SYS_LIBS}}
13
14 CC_FLAGS := ${CC_OPT_FLAGS} ${CC_ARCH_FLAGS} ${CC_CONFORM_FLAGS} ${CC_OBJ_FLAGS} ${CC_DIAG_FLAGS} ${CC_DEF_FLAGS} ${CC_INC_DIR_FLAGS}
15 CPP_FLAGS := ${CPP_OPT_FLAGS} ${CPP_ARCH_FLAGS} ${CPP_CONFORM_FLAGS} ${CPP_OBJ_FLAGS} ${CPP_DIAG_FLAGS} ${CPP_DEF_FLAGS} ${CPP_INC_DIR_FLAGS}
16 SWIG_FLAGS := ${SWIG_LANG_FLAG} ${SWIG_DOC_FLAG} ${SWIG_OPT_FLAGS} ${SWIG_INC_DIR_FLAGS}
17 PYTHON_FLAGS := ${PYTHON_OPT_FLAGS} ${PYTHON_DIAG_FLAGS}
18 AR_FLAGS := ${AR_OPTION_FLAGS}
19 LD_FLAGS := ${LD_DIAG_FLAGS} ${LD_LIB_DIR_FLAGS} ${LD_LIB_FLAGS}
20
21 # .o to .a
22 %.a: ${CC_OBJ} ${CPP_OBJ} ${SWIG_OBJ} force
23 @echo ----------------------------------------------------------------------------
24 ${AR} ${AR_FLAGS} ${L_LIB_DIR}/$@ ${addprefix ${L_OBJ_DIR}/, ${sort ${CC_OBJ} ${CPP_OBJ} ${SWIG_OBJ}}} ${L_EXT_OBJS}
25 @echo Generated \"$@: ${sort ${CC_OBJ} ${CPP_OBJ} ${SWIG_OBJ}}\".
26
27 # .lo to .so
28 %.so: ${CC_SHOBJ} ${CPP_SHOBJ} ${SWIG_SHOBJ} force
29 @echo ----------------------------------------------------------------------------
30 ${LD} ${LD_SHARE_FLAG} ${addprefix ${L_OBJ_DIR}/, ${sort ${CC_SHOBJ} ${CPP_SHOBJ} ${SWIG_SHOBJ}}} ${L_EXT_OBJS} ${LD_LIB_DIR_FLAGS} ${LD_LIB_FLAGS} ${LD_OUTPUT_FLAG} ${L_LIB_DIR}/$@
31 @echo Generated \"$@: ${sort ${CC_SHOBJ} ${CPP_SHOBJ} ${SWIG_SHOBJ}}\".
32
33 # .i to .cpp
34 %.cpp: %.i
35 @echo ----------------------------------------------------------------------------
36 ${strip ${SWIG} ${SWIG_FLAGS} ${SWIG_OUTPUT_FLAG} "${L_SRC_DIR}/${@}" $<}
37 @echo Generated \"$@: $<\".
38
39 # .c to .o
40 %.o: %.c
41 @echo ----------------------------------------------------------------------------
42 @if test ! -e "${L_OBJ_DIR}/${@D}"; \
43 then \
44 mkdir -p "${L_OBJ_DIR}/${@D}"; \
45 fi
46 ${strip ${CC} ${CC_FLAGS} $< ${CC_OUTPUT_FLAG} ${L_OBJ_DIR}/${@}}
47 @echo Compiled \"$@: $<\".
48
49 # .c to .lo
50 %.lo: %.c
51 @echo ----------------------------------------------------------------------------
52 @if test ! -e "${L_OBJ_DIR}/${@D}"; \
53 then \
54 mkdir -p "${L_OBJ_DIR}/${@D}"; \
55 fi
56 ${strip ${CC} ${CC_FLAGS} ${CC_SHARE_FLAGS} $< ${CC_OUTPUT_FLAG} ${L_OBJ_DIR}/${@}}
57 @echo Compiled \"$@: $<\".
58
59 # .cpp to .o
60 %.o: %.cpp
61 @echo ----------------------------------------------------------------------------
62 @if test ! -e "${L_OBJ_DIR}/${@D}"; \
63 then \
64 mkdir -p "${L_OBJ_DIR}/${@D}"; \
65 fi
66 ${strip ${CPP} ${CPP_FLAGS} $< ${CPP_OUTPUT_FLAG} ${L_OBJ_DIR}/${@}}
67 @echo Compiled \"$@: $<\".
68
69 # .cpp to .lo
70 %.lo: %.cpp
71 @echo ----------------------------------------------------------------------------
72 @if test ! -e "${L_OBJ_DIR}/${@D}"; \
73 then \
74 mkdir -p "${L_OBJ_DIR}/${@D}"; \
75 fi
76 ${strip ${CPP} ${CPP_FLAGS} ${CPP_SHARE_FLAGS} $< ${CPP_OUTPUT_FLAG} ${L_OBJ_DIR}/${@}}
77 @echo Compiled \"$@: $<\".
78
79 # .o to .exe
80 %.exe: ${CC_OBJ} ${CPP_OBJ} ${SWIG_OBJ} force
81 @echo ----------------------------------------------------------------------------
82 ${CPP} -o $@ ${addprefix ${L_OBJ_DIR}/, ${CC_OBJ} ${CPP_OBJ} ${SWIG_OBJ}} ${L_EXT_OBJS} ${LD_LIB_DIR_FLAGS} ${LD_LIB_FLAGS}
83 @echo Linked \"$@: $<\".
84
85 # .py to .pyc
86 %.pyc: %.py
87 @echo ----------------------------------------------------------------------------
88 ${PYTHON} ${PYTHON_FLAGS} ${PYTHON_CMD_FLAG} ${PYTHON_COMPILE_CMD}
89 @echo Compiled \"$@: $<\".
90
91 # $Log$
92 # Revision 1.1 2004/10/26 06:53:58 jgs
93 # Initial revision
94 #
95 # Revision 1.2 2004/09/23 01:48:45 jgs
96 # make: augmented Makefiles with comments throughout
97 #
98 # Makefile.default - changed order of includes for clarity
99 # Makfile.phony - reordered phony targets
100 # - added target "all" - now first target to be encountered
101 #
102 # Revision 1.1.1.1 2004/06/24 04:00:39 johng
103 # Initial version of eys using boost-python.
104 #
105 # Revision 1.5 2003/09/30 02:55:06 davies
106 # Added local makefile macro settings to replace hardcoded header files.
107 #
108 # Revision 1.4 2003/09/11 02:03:52 davies
109 # Added makefile configurations for several platforms.
110 #
111 # Revision 1.3 2003/08/29 04:25:06 davies
112 # Implement new feature for arbitrary external object linkage to provide a
113 # mechanism for direct shared object access.
114 #
115 # Revision 1.2 2003/08/25 02:14:10 davies
116 # Force builds of linked objects.
117 #
118 # Revision 1.1.1.1 2003/08/21 00:58:20 davies
119 # Imported sources from Lutz Gross.
120 #
121

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26