home *** CD-ROM | disk | FTP | other *** search
Makefile | 1998-03-15 | 8.5 KB | 305 lines |
- # -------------------------- makefile.bc -------------------------
- #
- # This makefile will build the examples supplied with InterBase 5.0.
- # See the Programmer's Guide for information about the example
- # databases and example programs.
- #
- # You MUST edit the IBASE definition in this file to point to the
- # directory where InterBase was installed. As well as the BCDIR
- # definition to point to the installations directory of your
- # Borland C/C++ Compiler.
- #
- # To build all the examples use the 'all' target, by issuing the
- # following command:
- #
- # make -f makefile.bc all
- #
- # To build any one individual target, use the following command:
- #
- # make -f makefile.bc 'target'
- #
- # where target 'target' is one of the following:
- # employe2.gdb, api1.exe, api2.exe, api3.exe, api4.exe,
- # api5.exe, api6.exe, api7.exe, api8.exe, api9.exe,
- # api9f.dll, api10.exe, api11.exe, api12.exe, api13.exe,
- # api14.exe, api15.exe, api16.exe, api16t.exe, apifull.exe,
- # dyn1.exe, dyn2.exe, dyn3.exe, dyn4.exe, dyn5.exe,
- # dynfull.exe, stat1.exe, stat2.exe, stat3.exe, stat4.exe,
- # stat5.exe, stat6.exe, stat7.exe, stat8.exe, stat9.exe,
- # stat10.exe, stat11.exe, stat12.exe, stat12t.exe,
- # udflib.dll
- #
- # ---------------------------------------------------------------------
-
- # ---------------------------------------------------------------------
- # InterBase Installation Directory
- #
- # CHANGE this definition to point to your InterBase installation directory
- # ---------------------------------------------------------------------
- IBASE= d:\interbase
-
- # ---------------------------------------------------------------------
- # Borland C/C++ Installation Directory
- #
- # CHANGE this definition to point to your compiler's installation directory
- # ---------------------------------------------------------------------
- BCDIR= d:\bc5
-
- # ---------------------------------------------------------------------
- # General InterBase Defines for Microsoft Windows 95/NT
- # ---------------------------------------------------------------------
- GPRE= $(IBASE)\bin\gpre -c -n
- GPRE_M= $(IBASE)\bin\gpre -c -n -m
- ISQL= $(IBASE)\bin\isql
- DB= employee.gdb
-
- # ---------------------------------------------------------------------
- # General Compiler and linker Defines for Borland C/C++ 5.0
- # ---------------------------------------------------------------------
- COMMON_FLAGS= -c -v -w- -a4 -tWM -DWIN32 $(INCLUDE)
- CFLAGS= $(COMMON_FLAGS) -tWC
- LIB_CFLAGS= $(COMMON_FLAGS) -tWCDE
- INCLUDE= -I$(IBASE)\include -I$(BCDIR)\include
- LFLAGS= /c /x /ap /Tpe
- LIBS= $(IBASE)\lib\gds32.lib
- CC= $(BCDIR)\bin\bcc32
- LINK= $(BCDIR)\bin\tlink32
- IMPLIB= $(BCDIR)\bin\implib
- COPY= copy
- RM= del
-
-
- # ---------------------------------------------------------------------
- # Generic Compilation Rules
- #
- # Do NOT change anything below this point.
- # ---------------------------------------------------------------------
- .SUFFIXES: .e .c .obj .exe
-
- .e.c:
- $(GPRE) $< -d $(DB)
-
- .c.obj:
- $(CC) $(CFLAGS) $<
-
- .obj.exe:
- @echo $(BCDIR)\lib\c0x32.obj+ > link.arg
- @echo $< >> link.arg
- @echo $@ >> link.arg
- @echo $(LFLAGS) >> link.arg
- @echo $(LIBS)+ >> link.arg
- @echo $(BCDIR)\lib\import32.lib+ >> link.arg
- @echo $(BCDIR)\lib\cw32mt.lib >> link.arg
- $(LINK) @link.arg
- -$(RM) link.arg
-
- # ---------------------------------------------------------------------
- # Specific targets to build
- # ---------------------------------------------------------------------
-
- cmt:
- @echo "--------------------------- makefile.bc -------------------------
- @echo "
- @echo " This makefile will build the InterBase 5.0 examples.
- @echo " See the Programmer's Guide for information about the example
- @echo " databases and example programs.
- @echo "
- @echo " You MUST edit the IBASE definition in this file to point to the
- @echo " directory where InterBase was installed. As well as the BCDIR
- @echo " definition to point to the installations directory of your
- @echo " Borland C/C++ Compiler.
- @echo "
- @echo " To build all the examples use the 'all' target, by issuing the
- @echo " following command:
- @echo "
- @echo " make -f makefile.bc all
- @echo "
- @echo " To build any one individual target, use the command:
- @echo "
- @echo " make -f makefile.bc 'target'
- @echo "
- @echo " where target 'target' is one of the following:
- @echo "
- @echo " employe2.gdb, api1.exe, api2.exe, api3.exe, api4.exe,
- @echo " api5.exe, api6.exe, api7.exe, api8.exe, api9.exe,
- @echo " api9f.dll, api10.exe, api11.exe, api12.exe, api13.exe,
- @echo " api14.exe, api15.exe, api16.exe, api16t.exe, apifull.exe,
- @echo " dyn1.exe, dyn2.exe, dyn3.exe, dyn4.exe, dyn5.exe,
- @echo " dynfull.exe, stat1.exe, stat2.exe, stat3.exe, stat4.exe,
- @echo " stat5.exe, stat6.exe, stat7.exe, stat8.exe, stat9.exe,
- @echo " stat10.exe, stat11.exe, stat12.exe, stat12t.exe,
- @echo " udflib.dll
- @echo "
- @echo "-----------------------------------------------------------------
-
- all: employe2.gdb api1.exe api2.exe api3.exe \
- api4.exe api5.exe api6.exe api7.exe api8.exe \
- api9.exe api9f.dll api10.exe api11.exe api12.exe api13.exe \
- api14.exe api15.exe api16.exe api16t.exe \
- apifull.exe dyn1.exe dyn2.exe dyn3.exe dyn4.exe \
- dyn5.exe dynfull.exe stat1.exe stat2.exe stat3.exe \
- stat4.exe stat5.exe stat6.exe stat7.exe stat8.exe stat9.exe \
- stat10.exe stat11.exe stat12.exe stat12t.exe udflib.dll
-
-
- employe2.gdb: employe2.sql
- $(ISQL) -i $?
-
- api9.obj: api9.c example.h api9f.sql
- $(CC) $(CFLAGS) api9.c $(LIBS)
- $(ISQL) employee.gdb -i api9f.sql
-
- api9f.obj: api9f.c example.h
- $(CC) $(LIB_CFLAGS) $?
-
- api9f.dll: api9f.obj
- # build a small argument file and use it
- @echo $(BCDIR)\lib\c0d32.obj+ > link.arg
- @echo $? >> link.arg
- @echo $@ >> link.arg
- @echo /x /Tpd >> link.arg
- @echo $(LIBS)+ >> link.arg
- @echo $(BCDIR)\lib\import32.lib+ >> link.arg
- @echo $(BCDIR)\lib\cw32mt.lib >> link.arg
- $(LINK) @link.arg
- @echo -----------------------------------------------------------
- @echo You need to copy api9f.dll to the interbase lib directory
- @echo in order for api9.exe to work correctly.
- @echo -----------------------------------------------------------
-
- udflib.obj: udflib.c example.h
- $(CC) $(LIB_CFLAGS) udflib.c
-
- udflib.dll: udflib.obj
- # build a small argument file and use it
- @echo $(BCDIR)\lib\c0d32.obj+ > link.arg
- @echo $? >> link.arg
- @echo $@ >> link.arg
- @echo /x /Tpd >> link.arg
- @echo $(LIBS)+ >> link.arg
- @echo $(BCDIR)\lib\import32.lib+ >> link.arg
- @echo $(BCDIR)\lib\cw32mt.lib >> link.arg
- $(LINK) @link.arg
- @echo -----------------------------------------------------------
- @echo You need to copy udflib.dll to the interbase lib directory
- @echo in order for the server to load it.
- @echo -----------------------------------------------------------
-
- api1.obj: api1.c example.h
-
- api2.obj: api2.c example.h
-
- api3.obj: api3.c example.h
-
- api4.obj: api4.c example.h
-
- api5.obj: api5.c example.h
-
- api6.obj: api6.c example.h
-
- api7.obj: api7.c example.h
-
- api8.obj: api8.c example.h
-
- api10.obj: api10.c example.h
-
- api11.obj: api11.c example.h
-
- api12.obj: api12.c example.h
-
- api13.obj: api13.c example.h
-
- api14.c: api14.e
-
- api14.obj: api14.c example.h
-
- apifull.obj: apifull.c example.h align.h
-
- stat1.c: stat1.e
-
- stat1.obj: stat1.c example.h
-
- stat2.c: stat2.e
-
- stat2.obj: stat2.c example.h
-
- stat3.c: stat3.e
-
- stat3.obj: stat3.c example.h
-
- stat4.c: stat4.e
-
- stat4.obj: stat4.c example.h
-
- stat5.c: stat5.e
-
- stat5.obj: stat5.c example.h
-
- stat6.c: stat6.e
-
- stat6.obj: stat6.c example.h
-
- stat7.c: stat7.e
-
- stat7.obj: stat7.c example.h
-
- stat8.c: stat8.e
-
- stat8.obj: stat8.c example.h
-
- stat9.c: stat9.e
-
- stat9.obj: stat9.c example.h
-
- stat10.c: stat10.e
- $(GPRE_M) $?
-
- stat10.obj: stat10.c example.h
-
- stat11.c: stat11.e
- $(GPRE_M) $?
-
- stat11.obj: stat11.c example.h
-
- stat12.c: stat12.e
- $(GPRE_M) $?
-
- stat12.obj: stat12.c example.h
-
- stat12t.c: stat12t.e
- $(GPRE_M) $?
-
- stat12t.obj: stat12t.c example.h
-
- dyn1.c: dyn1.e
- $(GPRE_M) $?
-
- dyn1.obj: dyn1.c example.h
-
- dyn2.c: dyn2.e
- $(GPRE_M) $?
-
- dyn2.obj: dyn2.c example.h
-
- dyn3.c: dyn3.e
- $(GPRE_M) $?
-
- dyn3.obj: dyn3.c example.h
-
- dyn4.c: dyn4.e
- $(GPRE_M) $?
-
- dyn4.obj: dyn4.c example.h
-
- dyn5.c: dyn5.e
- $(GPRE_M) $?
-
- dyn5.obj: dyn5.c example.h
-
- dynfull.c: dynfull.e
- $(GPRE_M) $?
-
- dynfull.obj: dynfull.c example.h align.h
-
-
-