home *** CD-ROM | disk | FTP | other *** search
/ Freelog 42 / Freelog042.iso / Alu / Ancestrologie / Sources / InterBase_WI-V6.0.1-server.ZIP / examples / udf / Makefile.bc < prev    next >
Makefile  |  2001-01-05  |  10KB  |  337 lines

  1. # The contents of this file are subject to the Interbase Public
  2. # License Version 1.0 (the "License"); you may not use this file
  3. # except in compliance with the License. You may obtain a copy
  4. # of the License at http://www.Inprise.com/IPL.html
  5. #
  6. # Software distributed under the License is distributed on an
  7. # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  8. # or implied. See the License for the specific language governing
  9. # rights and limitations under the License.
  10. #
  11. # The Original Code was created by Inprise Corporation
  12. # and its predecessors. Portions created by Inprise Corporation are
  13. #
  14. # Copyright (C) 2000 Inprise Corporation
  15. # All Rights Reserved.
  16. # Contributor(s): ______________________________________.
  17. # -------------------------- makefile.bc -------------------------
  18. #
  19. # This makefile will build the examples supplied with InterBase 5.0.
  20. # See the Programmer's Guide for information about the example
  21. # databases and example programs.
  22. #
  23. # You MUST edit the IBASE definition in this file to point to the
  24. # directory where InterBase was installed.  As well as the BCDIR
  25. # definition to point to the installations directory of your 
  26. # Borland C/C++ Compiler. 
  27. #
  28. # To build all the examples use the 'all' target, by issuing the 
  29. # following command:
  30. #
  31. #       make -f makefile.bc all
  32. #
  33. # To build any one individual target, use the following command:
  34. #
  35. #      make -f makefile.bc 'target'
  36. #
  37. # where target 'target' is one of the following:
  38. #     employe2.gdb, api1.exe, api2.exe, api3.exe, api4.exe, 
  39. #     api5.exe, api6.exe, api7.exe, api8.exe, api9.exe, 
  40. #     api9f.dll, api10.exe, api11.exe, api12.exe, api13.exe, 
  41. #     api14.exe, api15.exe, api16.exe, api16t.exe, apifull.exe, 
  42. #     dyn1.exe, dyn2.exe, dyn3.exe, dyn4.exe, dyn5.exe, 
  43. #     dynfull.exe, stat1.exe, stat2.exe, stat3.exe, stat4.exe, 
  44. #     stat5.exe, stat6.exe, stat7.exe, stat8.exe, stat9.exe, 
  45. #     stat10.exe, stat11.exe, stat12.exe, stat12t.exe, 
  46. #     udflib.dll
  47. #
  48. # ---------------------------------------------------------------------
  49.  
  50. # ---------------------------------------------------------------------
  51. # InterBase Installation Directory
  52. #
  53. # CHANGE this definition to point to your InterBase installation directory
  54. # ---------------------------------------------------------------------
  55. IBASE=        d:\interbase
  56.  
  57. # ---------------------------------------------------------------------
  58. # Borland C/C++ Installation Directory
  59. #
  60. # CHANGE this definition to point to your compiler's installation directory
  61. # ---------------------------------------------------------------------
  62. BCDIR=        d:\bc5
  63.  
  64. # ---------------------------------------------------------------------
  65. # General InterBase Defines for Microsoft Windows 95/NT
  66. # ---------------------------------------------------------------------
  67. GPRE=        $(IBASE)\bin\gpre -c -n
  68. GPRE_M=        $(IBASE)\bin\gpre -c -n -m
  69. ISQL=        $(IBASE)\bin\isql
  70. DB=        employee.gdb
  71.  
  72. # ---------------------------------------------------------------------
  73. # General Compiler and linker Defines for Borland C/C++ 5.0
  74. # ---------------------------------------------------------------------
  75. COMMON_FLAGS=    -c -v -w- -a4 -tWM -DWIN32 $(INCLUDE)
  76. CFLAGS=        $(COMMON_FLAGS) -tWC
  77. LIB_CFLAGS=    $(COMMON_FLAGS) -tWCDE
  78. INCLUDE=    -I$(IBASE)\include -I$(BCDIR)\include
  79. LFLAGS=        /c /x /ap /Tpe 
  80. LIBS=        $(IBASE)\lib\gds32.lib
  81. CC=        $(BCDIR)\bin\bcc32
  82. LINK=        $(BCDIR)\bin\tlink32
  83. IMPLIB=        $(BCDIR)\bin\implib
  84. COPY=        copy
  85. RM=        del
  86.  
  87.  
  88. # ---------------------------------------------------------------------
  89. # Generic Compilation Rules 
  90. #
  91. # Do NOT change anything below this point.
  92. # ---------------------------------------------------------------------
  93. .SUFFIXES: .e .c .obj .exe
  94.  
  95. .e.c:
  96.     $(GPRE) $< -d $(DB)
  97.  
  98. .c.obj:
  99.     $(CC) $(CFLAGS) $<
  100.  
  101. .obj.exe:
  102.     @echo $(BCDIR)\lib\c0x32.obj+ > link.arg
  103.     @echo $< >> link.arg
  104.     @echo $@ >> link.arg
  105.     @echo $(LFLAGS) >> link.arg 
  106.     @echo $(LIBS)+ >> link.arg
  107.     @echo $(BCDIR)\lib\import32.lib+ >> link.arg
  108.     @echo $(BCDIR)\lib\cw32mt.lib >> link.arg
  109.     $(LINK) @link.arg 
  110.     -$(RM) link.arg
  111.  
  112. # ---------------------------------------------------------------------
  113. # Specific targets to build 
  114. # ---------------------------------------------------------------------
  115.  
  116. cmt:
  117.     @echo "--------------------------- makefile.bc -------------------------
  118.     @echo "                                     
  119.     @echo " This makefile will build the InterBase 5.0 examples.        
  120.     @echo " See the Programmer's Guide for information about the example
  121.     @echo " databases and example programs.    
  122.     @echo "                                    
  123.     @echo " You MUST edit the IBASE definition in this file to point to the    
  124.     @echo " directory where InterBase was installed.  As well as the BCDIR 
  125.     @echo " definition to point to the installations directory of your         
  126.     @echo " Borland C/C++ Compiler.                     
  127.     @echo "                                    
  128.     @echo " To build all the examples use the 'all' target, by issuing the     
  129.     @echo " following command:                        
  130.     @echo "                                    
  131.     @echo "     make -f makefile.bc all                
  132.     @echo "                                    
  133.     @echo " To build any one individual target, use the command:    
  134.     @echo "                                    
  135.     @echo "     make -f makefile.bc 'target'                
  136.     @echo "                                    
  137.     @echo " where target 'target' is one of the following:            
  138.     @echo "                                    
  139.     @echo "     employe2.gdb, api1.exe, api2.exe, api3.exe, api4.exe, 
  140.     @echo "     api5.exe, api6.exe, api7.exe, api8.exe, api9.exe, 
  141.     @echo "     api9f.dll, api10.exe, api11.exe, api12.exe, api13.exe, 
  142.     @echo "     api14.exe, api15.exe, api16.exe, api16t.exe, apifull.exe, 
  143.     @echo "     dyn1.exe, dyn2.exe, dyn3.exe, dyn4.exe, dyn5.exe, 
  144.     @echo "     dynfull.exe, stat1.exe, stat2.exe, stat3.exe, stat4.exe, 
  145.     @echo "     stat5.exe, stat6.exe, stat7.exe, stat8.exe, stat9.exe, 
  146.     @echo "     stat10.exe, stat11.exe, stat12.exe, stat12t.exe, 
  147.     @echo "     udflib.dll
  148.     @echo "                                 
  149.     @echo "-----------------------------------------------------------------
  150.  
  151. all: employe2.gdb api1.exe api2.exe api3.exe \
  152.      api4.exe api5.exe api6.exe api7.exe api8.exe \
  153.      api9.exe api9f.dll api10.exe api11.exe api12.exe api13.exe \
  154.      api14.exe api15.exe api16.exe api16t.exe \
  155.      apifull.exe dyn1.exe dyn2.exe dyn3.exe dyn4.exe \
  156.      dyn5.exe dynfull.exe stat1.exe stat2.exe stat3.exe \
  157.      stat4.exe stat5.exe stat6.exe stat7.exe stat8.exe stat9.exe \
  158.      stat10.exe stat11.exe stat12.exe stat12t.exe udflib.dll 
  159.      
  160.  
  161. employe2.gdb: employe2.sql
  162.     $(ISQL) -i $?
  163.  
  164. api9.obj: api9.c example.h api9f.sql  
  165.     $(CC) $(CFLAGS) api9.c $(LIBS)
  166.     $(ISQL) employee.gdb -i api9f.sql
  167.  
  168. api9f.obj: api9f.c example.h
  169.     $(CC) $(LIB_CFLAGS) $?
  170.  
  171. api9f.dll: api9f.obj
  172. # build a small argument file and use it
  173.     @echo $(BCDIR)\lib\c0d32.obj+ > link.arg
  174.     @echo $? >> link.arg
  175.     @echo $@ >> link.arg
  176.     @echo /x /Tpd >> link.arg 
  177.     @echo $(LIBS)+ >> link.arg
  178.     @echo $(BCDIR)\lib\import32.lib+ >> link.arg
  179.     @echo $(BCDIR)\lib\cw32mt.lib >> link.arg
  180.     $(LINK) @link.arg
  181.     @echo -----------------------------------------------------------
  182.     @echo You need to copy api9f.dll to the interbase lib directory
  183.     @echo in order for api9.exe to work correctly.
  184.     @echo -----------------------------------------------------------
  185.  
  186. udflib.obj: udflib.c example.h
  187.     $(CC) $(LIB_CFLAGS) udflib.c
  188.  
  189. udflib.dll: udflib.obj
  190. # build a small argument file and use it
  191.     @echo $(BCDIR)\lib\c0d32.obj+ > link.arg
  192.     @echo $? >> link.arg
  193.     @echo $@ >> link.arg
  194.     @echo /x /Tpd >> link.arg 
  195.     @echo $(LIBS)+ >> link.arg
  196.     @echo $(BCDIR)\lib\import32.lib+ >> link.arg
  197.     @echo $(BCDIR)\lib\cw32mt.lib >> link.arg
  198.     $(LINK) @link.arg
  199.      @echo -----------------------------------------------------------
  200.     @echo You need to copy udflib.dll to the interbase lib directory
  201.     @echo in order for the server to load it. 
  202.     @echo -----------------------------------------------------------
  203.  
  204. # The contents of this file are subject to the Interbase Public
  205. # License Version 1.0 (the "License"); you may not use this file
  206. # except in compliance with the License. You may obtain a copy
  207. # of the License at http://www.Inprise.com/IPL.html
  208. #
  209. # Software distributed under the License is distributed on an
  210. # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  211. # or implied. See the License for the specific language governing
  212. # rights and limitations under the License.
  213. #
  214. # The Original Code was created by Inprise Corporation
  215. # and its predecessors. Portions created by Inprise Corporation are
  216. #
  217. # Copyright (C) 2000 Inprise Corporation
  218. # All Rights Reserved.
  219. # Contributor(s): ______________________________________.
  220. api1.obj: api1.c example.h
  221.  
  222. api2.obj: api2.c example.h
  223.  
  224. api3.obj: api3.c example.h
  225.  
  226. api4.obj: api4.c example.h
  227.  
  228. api5.obj: api5.c example.h
  229.  
  230. api6.obj: api6.c example.h
  231.  
  232. api7.obj: api7.c example.h
  233.  
  234. api8.obj: api8.c example.h
  235.  
  236. api10.obj: api10.c example.h
  237.  
  238. api11.obj: api11.c example.h
  239.  
  240. api12.obj: api12.c example.h
  241.  
  242. api13.obj: api13.c example.h
  243.  
  244. api14.c:  api14.e
  245.  
  246. api14.obj: api14.c example.h
  247.  
  248. apifull.obj: apifull.c example.h align.h
  249.  
  250. stat1.c: stat1.e
  251.  
  252. stat1.obj: stat1.c example.h
  253.  
  254. stat2.c: stat2.e
  255.  
  256. stat2.obj: stat2.c example.h
  257.  
  258. stat3.c: stat3.e
  259.  
  260. stat3.obj: stat3.c example.h
  261.  
  262. stat4.c: stat4.e
  263.  
  264. stat4.obj: stat4.c example.h
  265.  
  266. stat5.c: stat5.e
  267.  
  268. stat5.obj: stat5.c example.h
  269.  
  270. stat6.c: stat6.e
  271.  
  272. stat6.obj: stat6.c example.h
  273.  
  274. stat7.c: stat7.e
  275.  
  276. stat7.obj: stat7.c example.h
  277.  
  278. stat8.c: stat8.e
  279.  
  280. stat8.obj: stat8.c example.h
  281.  
  282. stat9.c: stat9.e
  283.  
  284. stat9.obj: stat9.c example.h
  285.  
  286. stat10.c: stat10.e
  287.     $(GPRE_M) $?
  288.  
  289. stat10.obj: stat10.c example.h
  290.  
  291. stat11.c: stat11.e
  292.     $(GPRE_M) $?
  293.  
  294. stat11.obj: stat11.c example.h
  295.  
  296. stat12.c: stat12.e
  297.     $(GPRE_M) $?
  298.  
  299. stat12.obj: stat12.c example.h
  300.  
  301. stat12t.c: stat12t.e
  302.     $(GPRE_M) $?
  303.  
  304. stat12t.obj: stat12t.c example.h
  305.  
  306. dyn1.c: dyn1.e
  307.     $(GPRE_M) $?
  308.  
  309. dyn1.obj: dyn1.c example.h
  310.  
  311. dyn2.c: dyn2.e
  312.     $(GPRE_M) $?
  313.  
  314. dyn2.obj: dyn2.c example.h
  315.  
  316. dyn3.c: dyn3.e
  317.     $(GPRE_M) $?
  318.  
  319. dyn3.obj: dyn3.c example.h
  320.  
  321. dyn4.c: dyn4.e
  322.     $(GPRE_M) $?
  323.  
  324. dyn4.obj: dyn4.c example.h
  325.  
  326. dyn5.c: dyn5.e
  327.     $(GPRE_M) $?
  328.  
  329. dyn5.obj: dyn5.c example.h
  330.  
  331. dynfull.c: dynfull.e
  332.     $(GPRE_M) $?
  333.  
  334. dynfull.obj: dynfull.c example.h align.h
  335.  
  336.  
  337.