home *** CD-ROM | disk | FTP | other *** search
/ Freelog 42 / Freelog042.iso / Alu / Ancestrologie / Sources / InterBase_WI-V6.0.1-server.ZIP / examples / udf / Makefile.msc < prev    next >
Makefile  |  2001-01-05  |  10KB  |  327 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.msc ------------------------
  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 MSCDIR
  25. # definition to point to the installations directory of your 
  26. # Microsoft C/C++ Compiler. 
  27. #
  28. # To build all the examples use the 'all' target, by issuing the 
  29. # following command:
  30. #
  31. #       nmake -f makefile.msc all
  32. #
  33. # To build any one individual target, use the following command:
  34. #
  35. #      nmake -f makefile.msc '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. # Microsoft C/C++ Installation Directory
  59. #
  60. # CHANGE this definition to point to your compiler's installation directory
  61. # ---------------------------------------------------------------------
  62. MSCDIR=        d:\DevStudio\VC
  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 Microsoft C/C++ 5.0
  74. # ---------------------------------------------------------------------
  75. CFLAGS=        -c -Zi -w -MD -DWIN32 $(INCLUDE)
  76. LIB_CFLAGS=    $(CFLAGS) -LD
  77. INCLUDE=    -I$(IBASE)\include -I$(MSCDIR)\include
  78. LIBS=        $(MSCDIR)\lib\msvcrt.lib $(IBASE)\lib\gds32_ms.lib
  79. CC=        $(MSCDIR)\bin\cl
  80. LINK=        $(MSCDIR)\bin\link
  81. LIBRARIAN=    $(MSCDIR)\bin\lib
  82. COPY=        copy
  83.  
  84. # ---------------------------------------------------------------------
  85. # Generic Compilation Rules 
  86. #
  87. # Do NOT change anything below this point.
  88. # ---------------------------------------------------------------------
  89. .SUFFIXES: .e .c .obj .exe
  90.  
  91. .e.c:
  92.     $(GPRE) $< -d $(DB)
  93.  
  94. .c.obj:
  95.     $(CC) $(CFLAGS) $< 
  96.  
  97. .obj.exe:
  98.     $(LINK) -out:$@ $< $(LIBS)
  99.  
  100.  
  101. # ---------------------------------------------------------------------
  102. # Specific targets to build 
  103. # ---------------------------------------------------------------------
  104.  
  105. cmt:
  106.     @echo "--------------------------- makefile.msc ------------------------
  107.     @echo "                                     
  108.     @echo " This makefile will build the InterBase 5.0 examples.
  109.     @echo " See the Programmer's Guide for information about the example
  110.     @echo " databases and example programs.    
  111.     @echo "                                    
  112.     @echo " You MUST edit the IBASE definition this file to point to the    
  113.     @echo " directory where InterBase was installed.  As well as the MSCDIR 
  114.     @echo " definition point to the installations directory of your 
  115.     @echo " Microsoft C/C++ Compiler.                     
  116.     @echo "                                    
  117.     @echo " To build all the examples use the 'all' target, by issuing the     
  118.     @echo " following command:                        
  119.     @echo "                                    
  120.     @echo "     nmake -f makefile.msc all                
  121.     @echo "                                    
  122.     @echo " To build any one individual target, use the command:    
  123.     @echo "                                    
  124.     @echo "     nmake -f makefile.msc 'target'                
  125.     @echo "                                    
  126.     @echo " where target 'target' is one of the following:            
  127.     @echo "                                    
  128.     @echo "     employe2.gdb, api1.exe, api2.exe, api3.exe, api4.exe, 
  129.     @echo "     api5.exe, api6.exe, api7.exe, api8.exe, api9.exe, 
  130.     @echo "     api9f.dll, api10.exe, api11.exe, api12.exe, api13.exe, 
  131.     @echo "     api14.exe, api15.exe, api16.exe, api16t.exe, apifull.exe, 
  132.     @echo "     dyn1.exe, dyn2.exe, dyn3.exe, dyn4.exe, dyn5.exe, 
  133.     @echo "     dynfull.exe, stat1.exe, stat2.exe, stat3.exe, stat4.exe, 
  134.     @echo "     stat5.exe, stat6.exe, stat7.exe, stat8.exe, stat9.exe, 
  135.     @echo "     stat10.exe, stat11.exe, stat12.exe, stat12t.exe, 
  136.     @echo "     udflib.dll
  137.     @echo "                                 
  138.     @echo "-----------------------------------------------------------------
  139.  
  140. all: employe2.gdb api1.exe api2.exe api3.exe \
  141.      api4.exe api5.exe api6.exe api7.exe api8.exe \
  142.      api9.exe api9f.dll api10.exe api11.exe api12.exe api13.exe \
  143.      api14.exe api15.exe api16.exe api16t.exe \
  144.      apifull.exe dyn1.exe dyn2.exe dyn3.exe dyn4.exe \
  145.      dyn5.exe dynfull.exe stat1.exe stat2.exe stat3.exe \
  146.      stat4.exe stat5.exe stat6.exe stat7.exe stat8.exe stat9.exe \
  147.      stat10.exe stat11.exe stat12.exe stat12t.exe udflib.dll 
  148.  
  149. employe2.gdb: employe2.sql
  150.     $(ISQL) -i $?
  151.  
  152. api9.obj: api9.c example.h api9f.sql
  153.     $(CC) $(CFLAGS) api9.c $(LIBS)
  154.     $(ISQL) employee.gdb -i api9f.sql
  155.  
  156. api9f.obj: api9f.c example.h
  157.     $(CC) $(LIB_CFLAGS) $?
  158.  
  159. api9f.lib api9f.exp: api9f.obj api9f.def
  160.     $(LIBRARIAN) api9f.obj -out:api9f.lib -def:api9f.def -machine:i386 \
  161.     -subsystem:console
  162.  
  163. api9f.dll: api9f.lib api9f.exp api9f.obj
  164. # build a small argument file and use it
  165.     @echo -entry:_DllMainCRTStartup@12 > link.arg
  166.     @echo -subsystem:console -DLL -DEBUG:FULL >> link.arg
  167.     @echo -out:api9f.dll >> link.arg
  168.     @echo api9f.exp api9f.obj $(LIBS) >> link.arg
  169.     $(LINK) @link.arg
  170.     @echo -----------------------------------------------------------
  171.     @echo You need to copy api9f.dll to the interbase lib directory
  172.     @echo in order for api9.exe to work correctly.
  173.     @echo -----------------------------------------------------------
  174.  
  175. udflib.obj: udflib.c example.h
  176.     $(CC) $(LIB_CFLAGS) udflib.c 
  177.  
  178. udflib.lib udflib.exp: udflib.obj udflib.def
  179.     $(LIBRARIAN) udflib.obj -out:udflib.lib -def:udflib.def -machine:i386 \
  180.     -subsystem:console
  181.  
  182. udflib.dll: udflib.lib udflib.obj udflib.exp
  183. # build a small argument file and use it
  184.     @echo -entry:_DllMainCRTStartup@12 > link.arg
  185.     @echo -subsystem:console -DLL >> link.arg
  186.     @echo -out:udflib.dll >> link.arg
  187.     @echo udflib.obj udflib.exp $(LIBS) >> link.arg
  188.     $(LINK) @link.arg
  189.     @echo -----------------------------------------------------------
  190.     @echo You need to copy udflib.dll to the interbase lib directory
  191.     @echo in order for the server to load it. 
  192.     @echo -----------------------------------------------------------
  193.  
  194. # The contents of this file are subject to the Interbase Public
  195. # License Version 1.0 (the "License"); you may not use this file
  196. # except in compliance with the License. You may obtain a copy
  197. # of the License at http://www.Inprise.com/IPL.html
  198. #
  199. # Software distributed under the License is distributed on an
  200. # "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
  201. # or implied. See the License for the specific language governing
  202. # rights and limitations under the License.
  203. #
  204. # The Original Code was created by Inprise Corporation
  205. # and its predecessors. Portions created by Inprise Corporation are
  206. #
  207. # Copyright (C) 2000 Inprise Corporation
  208. # All Rights Reserved.
  209. # Contributor(s): ______________________________________.
  210. api1.obj: api1.c example.h
  211.  
  212. api2.obj: api2.c example.h
  213.  
  214. api3.obj: api3.c example.h
  215.  
  216. api4.obj: api4.c example.h
  217.  
  218. api5.obj: api5.c example.h
  219.  
  220. api6.obj: api6.c example.h
  221.  
  222. api7.obj: api7.c example.h
  223.  
  224. api8.obj: api8.c example.h
  225.  
  226. api10.obj: api10.c example.h
  227.  
  228. api11.obj: api11.c example.h
  229.  
  230. api12.obj: api12.c example.h
  231.  
  232. api13.obj: api13.c example.h
  233.  
  234. api14.c:  api14.e
  235.  
  236. api14.obj: api14.c example.h
  237.  
  238. apifull.obj: apifull.c example.h align.h
  239.  
  240. stat1.c: stat1.e
  241.  
  242. stat1.obj: stat1.c example.h
  243.  
  244. stat2.c: stat2.e
  245.  
  246. stat2.obj: stat2.c example.h
  247.  
  248. stat3.c: stat3.e
  249.  
  250. stat3.obj: stat3.c example.h
  251.  
  252. stat4.c: stat4.e
  253.  
  254. stat4.obj: stat4.c example.h
  255.  
  256. stat5.c: stat5.e
  257.  
  258. stat5.obj: stat5.c example.h
  259.  
  260. stat6.c: stat6.e
  261.  
  262. stat6.obj: stat6.c example.h
  263.  
  264. stat7.c: stat7.e
  265.  
  266. stat7.obj: stat7.c example.h
  267.  
  268. stat8.c: stat8.e
  269.  
  270. stat8.obj: stat8.c example.h
  271.  
  272. stat9.c: stat9.e
  273.  
  274. stat9.obj: stat9.c example.h
  275.  
  276. stat10.c: stat10.e
  277.     $(GPRE_M) $?
  278.  
  279. stat10.obj: stat10.c example.h
  280.  
  281. stat11.c: stat11.e
  282.     $(GPRE_M) $?
  283.  
  284. stat11.obj: stat11.c example.h
  285.  
  286. stat12.c: stat12.e
  287.     $(GPRE_M) $?
  288.  
  289. stat12.obj: stat12.c example.h
  290.  
  291. stat12t.c: stat12t.e
  292.     $(GPRE_M) $?
  293.  
  294. stat12t.obj: stat12t.c example.h
  295.  
  296. dyn1.c: dyn1.e
  297.     $(GPRE_M) $?
  298.  
  299. dyn1.obj: dyn1.c example.h
  300.  
  301. dyn2.c: dyn2.e
  302.     $(GPRE_M) $?
  303.  
  304. dyn2.obj: dyn2.c example.h
  305.  
  306. dyn3.c: dyn3.e
  307.     $(GPRE_M) $?
  308.  
  309. dyn3.obj: dyn3.c example.h
  310.  
  311. dyn4.c: dyn4.e
  312.     $(GPRE_M) $?
  313.  
  314. dyn4.obj: dyn4.c example.h
  315.  
  316. dyn5.c: dyn5.e
  317.     $(GPRE_M) $?
  318.  
  319. dyn5.obj: dyn5.c example.h
  320.  
  321. dynfull.c: dynfull.e
  322.     $(GPRE_M) $?
  323.  
  324. dynfull.obj: dynfull.c example.h align.h
  325.  
  326.  
  327.