home *** CD-ROM | disk | FTP | other *** search
- # This 'make' file will generate the c-tree library and executables.
- #
- # To invoke the Turbo C make with this 'make' file, one has to pass
- # at least 1 parameter - MM, and a file named "mct.mac" which includes
- # the following
- # 1) TCD - if it is defined, use default Turbo C directory path
- # or TCDIR - if TCD is not defined, the Turbo C directory path
- # will be stored here
- # 2) RTREE - stores the given r-tree path, if it is not defined,
- # use default r-tree path
- # 3) TC10 - if set to 'x', it signify Turbo C version 1.0 is used
-
- !include "mct.mac"
-
- # MM - Memory model (s, c, m, l); it must be specified when invoking make
- !if !$d(MM)
- MM=s
- !endif
-
- # TCDIR - Turboc C directory
- !if !$d(TCDIR)
- TCDIR=c:\turboc
- !endif
-
- # RTREE - r-tree directory
- !if !$d(RTREE)
- RTREE=..\..\rtree
- !endif
-
- # COMPILER - compiler with appropriate switches
- COMPILER=$(TCDIR)\tcc -c -w-
-
- # TCP - compiler switch for Turbo C lib path
- TCP=-L$(TCDIR)\lib
-
- # P - path to 'include' files
- # - if using Turbo C 1.0, use
- # following definition for P instead
- !if $d(TC10)
- P=-I.\ -I..\ -I$(RTREE) -I$(TCDIR) -I$(TCDIR)\include -I$(TCDIR)\include\sys
- !else
- P=-I.\;..\;$(RTREE);$(TCDIR);$(TCDIR)\include;$(TCDIR)\include\sys
- !endif
-
- # CM - compiler memory model switch
- CM=-m$(MM)
-
- # D - c-tree library & utilities directory
- D=$(MM)app
-
- # LN - c-tree library name
- LN=ctalib
-
- # ALIB - c-tree library name with 'lib' extension
- ALIB=$(LN).lib
-
- # LIBRARIAN - object modules librarian
- LIBRARIAN=$(TCDIR)\tlib
-
- # LINK - linker with appropiate switch
- # if using Turbo C 1.0 with large memory model,
- # use special definition
- # (exit.obj has been extracted from c0l)
- !if $d(TC10) && $(mm)==l
- LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM) $(TCDIR)\lib\exit.obj
- !else
- LINK=$(TCDIR)\tlink $(TCDIR)\lib\c0$(MM)
- !endif
-
- # executables ----------------------------------------------------------------
-
- executables: $(D)\ctexmc.exe $(D)\ctexmg.exe $(D)\ctvxmg.exe $(D)\ctixmg.exe \
- $(D)\cttest.exe $(D)\ctcmpc.exe $(D)\ctflat.exe $(D)\ctpkey.exe \
- $(D)\ctrbld.exe
-
- # sample programs and utilities ----------------------------------------------
-
- $(D)\ctexmc.exe: $(D)\ctexmc.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctexmc.obj: ..\ctexmc.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctexmg.exe: $(D)\ctexmg.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctexmg.obj: ..\ctexmg.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctvxmg.exe: $(D)\ctvxmg.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctvxmg.obj: ..\ctvxmg.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctixmg.exe: $(D)\ctixmg.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctixmg.obj: ..\ctixmg.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\cttest.exe: ..\cttest.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- $(LINK) $&,$(D)\$&,, $(TCDIR)\lib\c$(MM)
- del cttest.obj
-
- $(D)\ctcmpc.exe: $(D)\ctcmpc.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctcmpc.obj: ..\ctcmpc.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctflat.exe: $(D)\ctflat.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctflat.obj: ..\ctflat.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctpkey.exe: $(D)\ctpkey.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctpkey.obj: ..\ctpkey.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctrbld.exe: $(D)\ctrbld.obj $(D)\$(ALIB)
- cd $(D)
- $(LINK) $&,$&,,$(ALIB) $(TCDIR)\lib\c$(MM)
- cd ..
-
- $(D)\ctrbld.obj: ..\ctrbld.c
- command /c echo CTRBLD CANNOT BE USED WITH FPUTFGET (create an entire NOTFORCE library)
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- # the c-tree library --------------------------------------------
-
- $(D)\$(ALIB) : $(D)\ctibld.obj $(D)\ctrbl2.obj $(D)\ctvrc2.obj \
- $(D)\ctdelk.obj $(D)\ctaddk.obj $(D)\ctupdt.obj \
- $(D)\ctsrch.obj $(D)\ctdatf.obj $(D)\ctkeyf.obj \
- $(D)\ctkrnl.obj $(D)\ctcomp.obj $(D)\ctvrcu.obj \
- $(D)\ctinit.obj $(D)\ctdelf.obj $(D)\ctclb2.obj \
- $(D)\ctclib.obj $(D)\ctclb3.obj $(D)\ctfrac.obj \
- $(D)\ctsset.obj $(D)\ctisam.obj $(D)\ctvrec.obj \
- $(D)\ctism2.obj $(D)\ctestm.obj $(D)\ctload.obj \
- $(D)\ctismc.obj $(D)\ctismo.obj $(D)\cticre.obj \
- $(D)\ctiopn.obj \
- $(D)\cticls.obj $(D)\ctifil.obj \
- $(D)\ctismu.obj $(D)\ctdbug.obj
- cd $(D)
- del $(LN).bak
- rename $(ALIB) $(LN).bak
- $(LIBRARIAN) $(ALIB) + ctibld + ctrbl2 + ctsset + ctisam + ctvrec + ctism2
- $(LIBRARIAN) $(ALIB) + ctismc + ctismo + cticre + ctiopn + cticls + ctifil
- $(LIBRARIAN) $(ALIB) + ctismu + ctvrc2 + ctload + ctdelk + ctaddk + ctupdt + ctestm + ctfrac
- $(LIBRARIAN) $(ALIB) + ctsrch + ctdatf + ctkeyf + ctkrnl + ctcomp + ctvrcu + ctdelf
- $(LIBRARIAN) $(ALIB) + ctinit + ctclb2 + ctclib + ctclb3 + ctdbug
- cd ..
-
- # library modules ----------------------------------------------------
-
- $(D)\ctibld.obj: ..\ctibld.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctrbl2.obj: ..\ctrbl2.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctvrc2.obj: ..\ctvrc2.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctdelk.obj: ..\ctdelk.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctaddk.obj: ..\ctaddk.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctupdt.obj: ..\ctupdt.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctsrch.obj: ..\ctsrch.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctdatf.obj: ..\ctdatf.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctkeyf.obj: ..\ctkeyf.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctkrnl.obj: ..\ctkrnl.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctclb3.obj: ..\ctclb3.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctcomp.obj: ..\ctcomp.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctvrcu.obj: ..\ctvrcu.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctinit.obj: ..\ctinit.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctdelf.obj: ..\ctdelf.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctload.obj: ..\ctload.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctfrac.obj: ..\ctfrac.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctestm.obj: ..\ctestm.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctclb2.obj: ..\ctclb2.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctclib.obj: ctclib.c
- $(COMPILER) $(P) $(TCP) $(CM) $&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctsset.obj: ..\ctsset.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctisam.obj: ..\ctisam.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctvrec.obj: ..\ctvrec.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctism2.obj: ..\ctism2.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctismc.obj: ..\ctismc.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctismo.obj: ..\ctismo.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\cticre.obj: ..\cticre.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctiopn.obj: ..\ctiopn.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\cticls.obj: ..\cticls.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctifil.obj: ..\ctifil.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctismu.obj: ..\ctismu.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- $(D)\ctdbug.obj: ..\ctdbug.c
- $(COMPILER) $(P) $(TCP) $(CM) ..\$&.c
- copy $&.obj $(D)\*.*
- del $&.obj
-
- # end
-