home *** CD-ROM | disk | FTP | other *** search
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: MAKESAMP.BAT Script for building AutoCAD ADS example programs. ::
- :: ::
- :: Run without arguments to compile all examples; or, provide the name of ::
- :: an example (without file extension) on the command line. If you ::
- :: specify an example, you must run this script from the directory where ::
- :: the example program resides. See README.ADS for more information. ::
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- @echo off
- echo --------------------------------------------------------------------
- echo Copyright (C) 1992 by Autodesk Inc. / MetaWare Inc.
- echo Permission to use, copy, modify, and distribute this software and its
- echo documentation for any purpose and without fee is hereby granted.
- echo THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
- echo ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR PURPOSE AND OF
- echo MERCHANTABILITY ARE HEREBY DISCLAIMED.
- echo --------------------------------------------------------------------
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: To build an ADS application you need the following:
- :: * the application's source code (for example, GRAVITY.C)
- :: * the ADS library (ADS.LIB or MWADS.LIB)
- :: * the High C libraries.
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Set next line to the full pathname of AutoCAD directory; e.g. ::
- :: set ACADPATH=c:\ACAD11 ::
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: set ADSPATH=c:\acad11
-
- if "%ADSPATH%" == "" goto noadspath
-
- @echo MAKESAMP: building sample AutoCAD ADS programs.
-
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: The following line sets ADS_COMP for AutoCAD R12, R11 or earlier.
- :: If you are using a later release, comment out this line (see README.ADS).
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- set ADS_COMP=-Hads -Hloclib -L%ADSPATH%\ads -I%ADSPATH%\ads -lads
-
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: FOR FUTURE RELEASES OF AutoCAD R12 (preferred if you have the MWADS
- :: library) you must comment out the above line and uncomment the
- :: following line.
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- :: set ADS_COMP=-Hads -L%ADSPATH%\ads -I%ADSPATH%\ads -lmwads
-
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Check to see that ADS_COMP has been set.
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- if not "%ADS_COMP%x" == "x" goto OK
- echo Please set ADS_COMP inside of batch file
- goto done
-
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Create the sample(s).
- :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-
- :OK
- @echo Creating sample.pro ...
- echo #define PROTOTYPES 1 > sample.pro
- echo #define HIGHC 1 >> sample.pro
- echo pragma On (Prototype_conversion_warn); >> sample.pro
- echo pragma Off(Prototype_override_warnings); >> sample.pro
- echo pragma On (Read_only_strings); >> sample.pro
- echo pragma On (Push_regsize); >> sample.pro
- echo pragma Off(Align_members); >> sample.pro
-
- if "%1x"=="x" goto COMP_ALL
-
- if exist %1.c goto COMP_C
- if exist %1.cpp goto COMP_CPP
- echo Neither %1.c nor %1.cpp exists in this directory.
- goto done
-
- :COMP_CPP
- @echo Compiling %1.cpp
-
- hc386 %ADS_COMP% -f287 %1.cpp -Hpro=sample.pro
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: For debugging: comment out the above line, and uncomment this line:
- :: hc386 -g %ADS_COMP% -f287 %1.cpp -Hkeep -Hpro=sample.pro
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- goto done
-
- :COMP_C
- @echo Compiling %1.c
-
- hc386 %ADS_COMP% -f287 %1.c -Hpro=sample.pro
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: For debugging: comment out the above line, and uncomment this line:
- :: hc386 -g %ADS_COMP% -f287 %1.c -Hkeep -Hpro=sample.pro
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- goto done
-
- :COMP_ALL
- @echo Compiling ads_perr.c
- hc386 ads_perr.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling arbmat.c
- hc386 arbmat.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling colext.c
- hc386 colext.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling fact.c
- hc386 fact.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling gravity.c
- hc386 gravity.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling magnets.c
- hc386 magnets.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling mountain.c
- hc386 mountain.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling ptext.c
- hc386 ptext.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- @echo Compiling sld2ps.c
- hc386 sld2ps.c %ADS_COMP% -f287 -Hpro=sample.pro
-
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Check if extra future-release examples are present.
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- if not exist adset.c goto done
-
- @echo Compiling adset.c
- hc386 adset.c %ADS_COMP% -lads.lib -Hpro=sample.pro
-
- @echo Compiling dlgtest.c
- hc386 dlgtest.c %ADS_COMP% -lads.lib -Hpro=sample.pro
-
- @echo Compiling sqr.c
- hc386 sqr.c %ADS_COMP% -lads.lib -Hpro=sample.pro
-
- @echo Compiling tadc.c
- hc386 tadc.c %ADS_COMP% -lads.lib -Hpro=sample.pro
-
- @echo Compiling tower.c
- hc386 tower.c %ADS_COMP% -lads.lib -Hpro=sample.pro
-
- if not exist sum.cpp goto done
- @echo Compiling sum.cpp
- hc386 %ADS_COMP% -f287 sum.cpp -Hpro=sample.pro
- goto done
-
- :noadspath
- @echo please set ADSPATH to point to acad directory
- goto end
-
- :done
- set ADS_COMP=
- set ADSPATH=
- @echo MAKESAMP completed.
- @echo on
-
- :end
-
-
-