Makefile.in.example5 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  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. ROOT=../..
  32. include $(ROOT)/src/make.defaults
  33. include $(ROOT)/src/make.platform
  34. include $(ROOT)/src/make.rules
  35. include $(ROOT)/src/make.shared.variables
  36. @SET_MAKE@
  37. PATH := $(BIN):$(PATH)
  38. export PATH
  39. GPRE_FLAGS= -r -m -z -n
  40. EXAMPLES_DEST= $(FIREBIRD)/examples/v5/
  41. EXAMPLES_SRC= ./
  42. EMPBLD_OBJ= empbuild.o
  43. INTLBLD_OBJ= intlbld.o
  44. INPUT_FILES= empddl.sql empdml.sql indexoff.sql indexon.sql \
  45. job.inp lang.inp proj.inp qtr.inp
  46. INTL_FILES= intlddl.sql intldml.sql indexoff.sql indexon.sql \
  47. job.inp lang.inp proj.inp qtr.inp
  48. # Add the install include directory to the search path since the
  49. # examples need to build using those headers values.
  50. CFLAGS := $(CFLAGS) -I$(FIREBIRD)/include
  51. .PHONY: all
  52. all: v5_examples
  53. # PR 2002-06-23 - Temporarily removed intlemp from the build as it caused a segfault
  54. # The lines to change back are prefixed with ##
  55. ##v5_examples: employee.fdb intlemp.fdb $(NT_EXAMPLES) makefile.example
  56. v5_examples: employee.fdb $(NT_EXAMPLES) makefile.example
  57. $(CP) $(EXAMPLES_SRC)readme $(EXAMPLES_DEST)README
  58. $(CP) $(EXAMPLES_SRC)align.h $(EXAMPLES_DEST)align.h
  59. $(CP) $(EXAMPLES_SRC)api1.c $(EXAMPLES_DEST)api1.c
  60. $(CP) $(EXAMPLES_SRC)api10.c $(EXAMPLES_DEST)api10.c
  61. $(CP) $(EXAMPLES_SRC)api11.c $(EXAMPLES_DEST)api11.c
  62. $(CP) $(EXAMPLES_SRC)api12.c $(EXAMPLES_DEST)api12.c
  63. $(CP) $(EXAMPLES_SRC)api13.c $(EXAMPLES_DEST)api13.c
  64. $(CP) $(EXAMPLES_SRC)api14.e $(EXAMPLES_DEST)api14.e
  65. $(CP) $(EXAMPLES_SRC)api15.c $(EXAMPLES_DEST)api15.c
  66. $(CP) $(EXAMPLES_SRC)api16.c $(EXAMPLES_DEST)api16.c
  67. $(CP) $(EXAMPLES_SRC)api16t.c $(EXAMPLES_DEST)api16t.c
  68. $(CP) $(EXAMPLES_SRC)api2.c $(EXAMPLES_DEST)api2.c
  69. $(CP) $(EXAMPLES_SRC)api3.c $(EXAMPLES_DEST)api3.c
  70. $(CP) $(EXAMPLES_SRC)api4.c $(EXAMPLES_DEST)api4.c
  71. $(CP) $(EXAMPLES_SRC)api5.c $(EXAMPLES_DEST)api5.c
  72. $(CP) $(EXAMPLES_SRC)api6.c $(EXAMPLES_DEST)api6.c
  73. $(CP) $(EXAMPLES_SRC)api7.c $(EXAMPLES_DEST)api7.c
  74. $(CP) $(EXAMPLES_SRC)api8.c $(EXAMPLES_DEST)api8.c
  75. $(CP) $(EXAMPLES_SRC)api9.c $(EXAMPLES_DEST)api9.c
  76. $(CP) $(EXAMPLES_SRC)api9f.c $(EXAMPLES_DEST)api9f.c
  77. $(CP) $(EXAMPLES_SRC)apifull.c $(EXAMPLES_DEST)apifull.c
  78. $(CP) $(EXAMPLES_SRC)employe2.sql $(EXAMPLES_DEST)employe2.sql
  79. $(CP) $(EXAMPLES_SRC)dyn1.e $(EXAMPLES_DEST)dyn1.e
  80. $(CP) $(EXAMPLES_SRC)dyn2.e $(EXAMPLES_DEST)dyn2.e
  81. $(CP) $(EXAMPLES_SRC)dyn3.e $(EXAMPLES_DEST)dyn3.e
  82. $(CP) $(EXAMPLES_SRC)dyn4.e $(EXAMPLES_DEST)dyn4.e
  83. $(CP) $(EXAMPLES_SRC)dyn5.e $(EXAMPLES_DEST)dyn5.e
  84. $(CP) $(EXAMPLES_SRC)dynfull.e $(EXAMPLES_DEST)dynfull.e
  85. $(ECHO) $(LD_LIBRARY_PATH)
  86. $(GBAK) employee.fdb $(EXAMPLES_DEST)employee.gbk
  87. # -$(RM) $(EXAMPLES_DEST)employee.fdb
  88. $(GBAK) -r $(EXAMPLES_DEST)employee.gbk $(EXAMPLES_DEST)employee.fdb
  89. $(CP) $(EXAMPLES_SRC)example.h $(EXAMPLES_DEST)example.h
  90. $(CP) $(EXAMPLES_SRC)api9f.sql $(EXAMPLES_DEST)api9f.sql
  91. ## $(GBAK) intlemp.fdb $(EXAMPLES_DEST)intlemp.gbk
  92. # -$(RM) $(EXAMPLES_DEST)intlemp.fdb
  93. ## $(GBAK) -r $(EXAMPLES_DEST)intlemp.gbk $(EXAMPLES_DEST)intlemp.fdb
  94. $(CP) $(EXAMPLES_SRC)stat1.e $(EXAMPLES_DEST)stat1.e
  95. $(CP) $(EXAMPLES_SRC)stat10.e $(EXAMPLES_DEST)stat10.e
  96. $(CP) $(EXAMPLES_SRC)stat11.e $(EXAMPLES_DEST)stat11.e
  97. $(CP) $(EXAMPLES_SRC)stat12.e $(EXAMPLES_DEST)stat12.e
  98. $(CP) $(EXAMPLES_SRC)stat12t.e $(EXAMPLES_DEST)stat12t.e
  99. $(CP) $(EXAMPLES_SRC)stat2.e $(EXAMPLES_DEST)stat2.e
  100. $(CP) $(EXAMPLES_SRC)stat3.e $(EXAMPLES_DEST)stat3.e
  101. $(CP) $(EXAMPLES_SRC)stat4.e $(EXAMPLES_DEST)stat4.e
  102. $(CP) $(EXAMPLES_SRC)stat5.e $(EXAMPLES_DEST)stat5.e
  103. $(CP) $(EXAMPLES_SRC)stat6.e $(EXAMPLES_DEST)stat6.e
  104. $(CP) $(EXAMPLES_SRC)stat7.e $(EXAMPLES_DEST)stat7.e
  105. $(CP) $(EXAMPLES_SRC)stat8.e $(EXAMPLES_DEST)stat8.e
  106. $(CP) $(EXAMPLES_SRC)stat9.e $(EXAMPLES_DEST)stat9.e
  107. $(CP) $(EXAMPLES_SRC)udf.sql $(EXAMPLES_DEST)udf.sql
  108. $(CP) $(EXAMPLES_SRC)udflib.c $(EXAMPLES_DEST)udflib.c
  109. $(CP) makefile.example $(EXAMPLES_DEST)makefile
  110. nt_examples:
  111. $(CP) $(EXAMPLES_SRC)api9f.def $(EXAMPLES_DEST)api9f.def
  112. $(CP) $(EXAMPLES_SRC)udflib.def $(EXAMPLES_DEST)udflib.def
  113. $(CP) $(EXAMPLES_SRC)makefile.bc $(EXAMPLES_DEST)Makefile.bc
  114. $(CP) $(EXAMPLES_SRC)makefile.msc $(EXAMPLES_DEST)Makefile.msc
  115. # Ok the following little story is, first build empbuild.fdb an empty db
  116. # using a script file. Then we can compile the empbuild.e file, then we
  117. # can run it to create employee.fdb database populated with data by the
  118. # program. Thats how I found it.
  119. employee.fdb: empbuild$(EXEC_EXT) $(INPUT_FILES)
  120. -$(RM) employee.fdb
  121. # $(CP) $(SRC_ROOT)/examples/empddl.sql .
  122. # $(CP) $(SRC_ROOT)/examples/indexoff.sql .
  123. # $(CP) $(SRC_ROOT)/examples/indexon.sql .
  124. # $(CP) $(SRC_ROOT)/examples/empdml.sql .
  125. # $(CP) $(SRC_ROOT)/examples/lang.inp .
  126. # $(CP) $(SRC_ROOT)/examples/proj.inp .
  127. # $(CP) $(SRC_ROOT)/examples/job.inp .
  128. # $(CP) $(SRC_ROOT)/examples/qtr.inp .
  129. ./empbuild employee.fdb
  130. -$(CHMOD_6) employee.fdb
  131. empbuild: $(EMPBLD_OBJ) $(LIBGDS_DEP)
  132. -$(RM) $@
  133. $(EXE_LINK) $(LINK_OPTS) $(LIBGDS_LINK) $^ -o $@ $(LINK_LIBS)
  134. $(CHMOD_7) $@
  135. empbuild.exe: $(EMPBLD_OBJ)
  136. -$(RM) empbuild.exe
  137. $(LD) $(O_EXE_SWITCH)empbuild $(LINK_OPTS) empbuild.o $(GDS_LINK)
  138. empbuild.c: empbuild.fdb empbuild.e
  139. empbuild.fdb : empddl.sql empbld.sql
  140. -$(RM) $@
  141. $(ISQL) -i empbld.sql
  142. # The chain for intlemp.fdb is the same a script file to create an empty database
  143. # to allow a .e program to be compiled, to then create and populate with data
  144. # the intlemp.fdb database.
  145. intlemp.fdb: intlbld$(EXEC_EXT) $(INTL_FILES)
  146. -$(RM) intlemp.fdb
  147. # $(CP) $(SRC_ROOT)/examples/intlddl.sql .
  148. # $(CP) $(SRC_ROOT)/examples/indexoff.sql .
  149. # $(CP) $(SRC_ROOT)/examples/indexon.sql .
  150. # $(CP) $(SRC_ROOT)/examples/intldml.sql .
  151. # $(CP) $(SRC_ROOT)/examples/lang.inp .
  152. ./intlbld intlemp.fdb
  153. -$(CHMOD_6) intlemp.fdb
  154. intlbuild.fdb : intlddl.sql intlbld.sql
  155. -$(RM) intlbuild.fdb
  156. $(ISQL) -i intlbld.sql
  157. intlbld: $(INTLBLD_OBJ) $(LIBGDS_DEP)
  158. -$(RM) $@
  159. $(EXE_LINK) $(LINK_OPTS) $(LIBGDS_LINK) $^ -o $@ $(LINK_LIBS)
  160. $(CHMOD_7) $@
  161. intlbld.exe: $(INTLBLD_OBJ)
  162. -$(RM) intlbld.exe
  163. $(LD) $(O_EXE_SWITCH)intlbld $(LINK_OPTS) intlbld.o $(GDS_LINK)
  164. intlbld.c: intlbuild.fdb intlbld.e
  165. makefile.example: Makefile
  166. $(CP) Makefile makefile.example