Debian Codegraph @

examples/build_unix/Makefile.in.example5

raw
1 #
2 # The contents of this file are subject to the Mozilla Public
3 # License Version 1.1 (the "License"); you may not use this file
4 # except in compliance with the License. You may obtain a copy of
5 # the License at http://www.mozilla.org/MPL/
6 # Alternatively, the contents of this file may be used under the
7 # terms of the GNU General Public License Version 2 or later (the
8 # "GPL"), in which case the provisions of the GPL are applicable
9 # instead of those above. You may obtain a copy of the Licence at
10 # http://www.gnu.org/copyleft/gpl.html
11 #
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # Relevant for more details.
16 #
17 # This file was created by members of the firebird development team.
18 # All individual contributions remain the Copyright (C) of those
19 # individuals. Contributors to this file are either listed here or
20 # can be obtained from a CVS history command.
21 #
22 # All rights reserved.
23 #
24 # Created by: Mark O'Donohue <[email protected]>
25 #
26 # Contributor(s):
27 #
28 #
29 # $Id: Makefile.in.example5,v 1.1 2003-07-11 13:30:32 brodsom Exp $
30 #
31
32 ROOT=../..
33
34 include $(ROOT)/src/make.defaults
35 include $(ROOT)/src/make.platform
36 include $(ROOT)/src/make.rules
37 include $(ROOT)/src/make.shared.variables
38
39 @SET_MAKE@
40
41 PATH := $(BIN):$(PATH)
42 export PATH
43
44
45 GPRE_FLAGS= -r -m -z -n
46
47 EXAMPLES_DEST= $(FIREBIRD)/examples/v5/
48 EXAMPLES_SRC= ./
49
50 EMPBLD_OBJ= empbuild.o
51
52 INTLBLD_OBJ= intlbld.o
53
54 INPUT_FILES= empddl.sql empdml.sql indexoff.sql indexon.sql \
55 job.inp lang.inp proj.inp qtr.inp
56
57 INTL_FILES= intlddl.sql intldml.sql indexoff.sql indexon.sql \
58 job.inp lang.inp proj.inp qtr.inp
59
60
61 # Add the install include directory to the search path since the
62 # examples need to build using those headers values.
63
64 CFLAGS := $(CFLAGS) -I$(FIREBIRD)/include
65
66 .PHONY: all
67
68 all: v5_examples
69
70 # PR 2002-06-23 - Temporarily removed intlemp from the build as it caused a segfault
71 # The lines to change back are prefixed with ##
72 ##v5_examples: employee.fdb intlemp.fdb $(NT_EXAMPLES) makefile.example
73 v5_examples: employee.fdb $(NT_EXAMPLES) makefile.example
74 $(CP) $(EXAMPLES_SRC)readme $(EXAMPLES_DEST)README
75 $(CP) $(EXAMPLES_SRC)align.h $(EXAMPLES_DEST)align.h
76 $(CP) $(EXAMPLES_SRC)api1.c $(EXAMPLES_DEST)api1.c
77 $(CP) $(EXAMPLES_SRC)api10.c $(EXAMPLES_DEST)api10.c
78 $(CP) $(EXAMPLES_SRC)api11.c $(EXAMPLES_DEST)api11.c
79 $(CP) $(EXAMPLES_SRC)api12.c $(EXAMPLES_DEST)api12.c
80 $(CP) $(EXAMPLES_SRC)api13.c $(EXAMPLES_DEST)api13.c
81 $(CP) $(EXAMPLES_SRC)api14.e $(EXAMPLES_DEST)api14.e
82 $(CP) $(EXAMPLES_SRC)api15.c $(EXAMPLES_DEST)api15.c
83 $(CP) $(EXAMPLES_SRC)api16.c $(EXAMPLES_DEST)api16.c
84 $(CP) $(EXAMPLES_SRC)api16t.c $(EXAMPLES_DEST)api16t.c
85 $(CP) $(EXAMPLES_SRC)api2.c $(EXAMPLES_DEST)api2.c
86 $(CP) $(EXAMPLES_SRC)api3.c $(EXAMPLES_DEST)api3.c
87 $(CP) $(EXAMPLES_SRC)api4.c $(EXAMPLES_DEST)api4.c
88 $(CP) $(EXAMPLES_SRC)api5.c $(EXAMPLES_DEST)api5.c
89 $(CP) $(EXAMPLES_SRC)api6.c $(EXAMPLES_DEST)api6.c
90 $(CP) $(EXAMPLES_SRC)api7.c $(EXAMPLES_DEST)api7.c
91 $(CP) $(EXAMPLES_SRC)api8.c $(EXAMPLES_DEST)api8.c
92 $(CP) $(EXAMPLES_SRC)api9.c $(EXAMPLES_DEST)api9.c
93 $(CP) $(EXAMPLES_SRC)api9f.c $(EXAMPLES_DEST)api9f.c
94 $(CP) $(EXAMPLES_SRC)apifull.c $(EXAMPLES_DEST)apifull.c
95 $(CP) $(EXAMPLES_SRC)employe2.sql $(EXAMPLES_DEST)employe2.sql
96 $(CP) $(EXAMPLES_SRC)dyn1.e $(EXAMPLES_DEST)dyn1.e
97 $(CP) $(EXAMPLES_SRC)dyn2.e $(EXAMPLES_DEST)dyn2.e
98 $(CP) $(EXAMPLES_SRC)dyn3.e $(EXAMPLES_DEST)dyn3.e
99 $(CP) $(EXAMPLES_SRC)dyn4.e $(EXAMPLES_DEST)dyn4.e
100 $(CP) $(EXAMPLES_SRC)dyn5.e $(EXAMPLES_DEST)dyn5.e
101 $(CP) $(EXAMPLES_SRC)dynfull.e $(EXAMPLES_DEST)dynfull.e
102 $(ECHO) $(LD_LIBRARY_PATH)
103 $(GBAK) employee.fdb $(EXAMPLES_DEST)employee.gbk
104 # -$(RM) $(EXAMPLES_DEST)employee.fdb
105 $(GBAK) -r $(EXAMPLES_DEST)employee.gbk $(EXAMPLES_DEST)employee.fdb
106 $(CP) $(EXAMPLES_SRC)example.h $(EXAMPLES_DEST)example.h
107 $(CP) $(EXAMPLES_SRC)api9f.sql $(EXAMPLES_DEST)api9f.sql
108 ## $(GBAK) intlemp.fdb $(EXAMPLES_DEST)intlemp.gbk
109 # -$(RM) $(EXAMPLES_DEST)intlemp.fdb
110 ## $(GBAK) -r $(EXAMPLES_DEST)intlemp.gbk $(EXAMPLES_DEST)intlemp.fdb
111 $(CP) $(EXAMPLES_SRC)stat1.e $(EXAMPLES_DEST)stat1.e
112 $(CP) $(EXAMPLES_SRC)stat10.e $(EXAMPLES_DEST)stat10.e
113 $(CP) $(EXAMPLES_SRC)stat11.e $(EXAMPLES_DEST)stat11.e
114 $(CP) $(EXAMPLES_SRC)stat12.e $(EXAMPLES_DEST)stat12.e
115 $(CP) $(EXAMPLES_SRC)stat12t.e $(EXAMPLES_DEST)stat12t.e
116 $(CP) $(EXAMPLES_SRC)stat2.e $(EXAMPLES_DEST)stat2.e
117 $(CP) $(EXAMPLES_SRC)stat3.e $(EXAMPLES_DEST)stat3.e
118 $(CP) $(EXAMPLES_SRC)stat4.e $(EXAMPLES_DEST)stat4.e
119 $(CP) $(EXAMPLES_SRC)stat5.e $(EXAMPLES_DEST)stat5.e
120 $(CP) $(EXAMPLES_SRC)stat6.e $(EXAMPLES_DEST)stat6.e
121 $(CP) $(EXAMPLES_SRC)stat7.e $(EXAMPLES_DEST)stat7.e
122 $(CP) $(EXAMPLES_SRC)stat8.e $(EXAMPLES_DEST)stat8.e
123 $(CP) $(EXAMPLES_SRC)stat9.e $(EXAMPLES_DEST)stat9.e
124 $(CP) $(EXAMPLES_SRC)udf.sql $(EXAMPLES_DEST)udf.sql
125 $(CP) $(EXAMPLES_SRC)udflib.c $(EXAMPLES_DEST)udflib.c
126 $(CP) makefile.example $(EXAMPLES_DEST)makefile
127
128 nt_examples:
129 $(CP) $(EXAMPLES_SRC)api9f.def $(EXAMPLES_DEST)api9f.def
130 $(CP) $(EXAMPLES_SRC)udflib.def $(EXAMPLES_DEST)udflib.def
131 $(CP) $(EXAMPLES_SRC)makefile.bc $(EXAMPLES_DEST)Makefile.bc
132 $(CP) $(EXAMPLES_SRC)makefile.msc $(EXAMPLES_DEST)Makefile.msc
133
134 # Ok the following little story is, first build empbuild.fdb an empty db
135 # using a script file. Then we can compile the empbuild.e file, then we
136 # can run it to create employee.fdb database populated with data by the
137 # program. Thats how I found it.
138
139 employee.fdb: empbuild$(EXEC_EXT) $(INPUT_FILES)
140 -$(RM) employee.fdb
141 # $(CP) $(SRC_ROOT)/examples/empddl.sql .
142 # $(CP) $(SRC_ROOT)/examples/indexoff.sql .
143 # $(CP) $(SRC_ROOT)/examples/indexon.sql .
144 # $(CP) $(SRC_ROOT)/examples/empdml.sql .
145 # $(CP) $(SRC_ROOT)/examples/lang.inp .
146 # $(CP) $(SRC_ROOT)/examples/proj.inp .
147 # $(CP) $(SRC_ROOT)/examples/job.inp .
148 # $(CP) $(SRC_ROOT)/examples/qtr.inp .
149 ./empbuild employee.fdb
150 -$(CHMOD_6) employee.fdb
151
152 empbuild: $(EMPBLD_OBJ) $(LIBGDS_DEP)
153 -$(RM) $@
154 $(EXE_LINK) $(LINK_OPTS) $(LIBGDS_LINK) $^ -o $@ $(LINK_LIBS)
155 $(CHMOD_7) $@
156
157 empbuild.exe: $(EMPBLD_OBJ)
158 -$(RM) empbuild.exe
159 $(LD) $(O_EXE_SWITCH)empbuild $(LINK_OPTS) empbuild.o $(GDS_LINK)
160
161 empbuild.c: empbuild.fdb empbuild.e
162
163 empbuild.fdb : empddl.sql empbld.sql
164 -$(RM) $@
165 $(ISQL) -i empbld.sql
166
167
168 # The chain for intlemp.fdb is the same a script file to create an empty database
169 # to allow a .e program to be compiled, to then create and populate with data
170 # the intlemp.fdb database.
171
172 intlemp.fdb: intlbld$(EXEC_EXT) $(INTL_FILES)
173 -$(RM) intlemp.fdb
174 # $(CP) $(SRC_ROOT)/examples/intlddl.sql .
175 # $(CP) $(SRC_ROOT)/examples/indexoff.sql .
176 # $(CP) $(SRC_ROOT)/examples/indexon.sql .
177 # $(CP) $(SRC_ROOT)/examples/intldml.sql .
178 # $(CP) $(SRC_ROOT)/examples/lang.inp .
179 ./intlbld intlemp.fdb
180 -$(CHMOD_6) intlemp.fdb
181
182 intlbuild.fdb : intlddl.sql intlbld.sql
183 -$(RM) intlbuild.fdb
184 $(ISQL) -i intlbld.sql
185
186 intlbld: $(INTLBLD_OBJ) $(LIBGDS_DEP)
187 -$(RM) $@
188 $(EXE_LINK) $(LINK_OPTS) $(LIBGDS_LINK) $^ -o $@ $(LINK_LIBS)
189 $(CHMOD_7) $@
190
191 intlbld.exe: $(INTLBLD_OBJ)
192 -$(RM) intlbld.exe
193 $(LD) $(O_EXE_SWITCH)intlbld $(LINK_OPTS) intlbld.o $(GDS_LINK)
194
195
196 intlbld.c: intlbuild.fdb intlbld.e
197
198
199
200 makefile.example: Makefile
201 $(CP) Makefile makefile.example