ccomx-develop Mailing List for CCOM - a lib for serial port interface
Brought to you by:
chrisan,
rasmusmyklebust
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
|
Feb
(62) |
Mar
|
Apr
|
May
(4) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(4) |
Nov
|
Dec
|
From: Christer S. <ch...@us...> - 2005-10-29 18:57:20
|
Update of /cvsroot/ccomx/ccom/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19848/docs Modified Files: ccom._tx changes._tx Log Message: Set correct line endings in fix* in the distribution package, and improved the scrips to avoid future problems. Index: changes._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/changes._tx,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** changes._tx 21 Sep 2005 18:12:09 -0000 1.5 --- changes._tx 29 Oct 2005 18:57:10 -0000 1.6 *************** *** 38,41 **** --- 38,47 ---- @heading Changes + + 0.9.4: + <ul> + <li> + "Set correct line endings in fix* in the distribution package, and improved the scrips to avoid future problems." + </ul> 0.9.3: <ul> Index: ccom._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/ccom._tx,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ccom._tx 21 Sep 2005 18:12:08 -0000 1.8 --- ccom._tx 29 Oct 2005 18:57:10 -0000 1.9 *************** *** 6,10 **** @# @multiwordheaders ! @manh="version 0.9.3" "CCOM" "Manual" @document_title=CCOM Manual @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports --- 6,10 ---- @# @multiwordheaders ! @manh="version 0.9.4" "CCOM" "Manual" @document_title=CCOM Manual @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports *************** *** 32,36 **** <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> <center><b> ! The Manual of CCOM 0.9.3 </b></center> @!text --- 32,36 ---- <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> <center><b> ! The Manual of CCOM 0.9.4 </b></center> @!text |
From: Christer S. <ch...@us...> - 2005-10-29 18:57:18
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19848/misc Modified Files: makefile.ver zipup.sh Removed Files: makefile.bcc Log Message: Set correct line endings in fix* in the distribution package, and improved the scrips to avoid future problems. Index: makefile.ver =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.ver,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** makefile.ver 21 Sep 2005 18:12:10 -0000 1.8 --- makefile.ver 29 Oct 2005 18:57:10 -0000 1.9 *************** *** 7,10 **** # Shared library versions for Unix # todo: this is unused at the moment ! shared_version = 0.9.3 shared_major_minor = 0.9 --- 7,10 ---- # Shared library versions for Unix # todo: this is unused at the moment ! shared_version = 0.9.4 shared_major_minor = 0.9 --- makefile.bcc DELETED --- Index: zipup.sh =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/zipup.sh,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** zipup.sh 21 Sep 2005 18:12:10 -0000 1.9 --- zipup.sh 29 Oct 2005 18:57:10 -0000 1.10 *************** *** 12,23 **** # note: these are patched by fixver.sh script. ! zipversion=093 ! tgzversion=0.9.3 if [ "$1" != "-q" ]; then echo clean up... ! ./fix.sh djgpp --dtou ! make clean # Dont generate dependencies if a parameter was given. --- 12,23 ---- # note: these are patched by fixver.sh script. ! zipversion=094 ! tgzversion=0.9.4 if [ "$1" != "-q" ]; then echo clean up... ! # Make unix line endings ! ./fix.sh unix --dtou # Dont generate dependencies if a parameter was given. *************** *** 27,46 **** if [ "$1" = "--no-depend" ]; then echo skip generating dependencies - ./fix.sh djgpp --quick else echo generate dll stuff... ./misc/fixdll.sh echo generate dependencies... ./fix.sh mingw32 --quick make depend ./fix.sh msvc --quick make depend ./fix.sh unix --quick make depend ./fix.sh djgpp --quick make depend - # ./fix.sh bcc32 --quick - # make depend - ./fix.sh djgpp --quick fi --- 27,47 ---- if [ "$1" = "--no-depend" ]; then echo skip generating dependencies else echo generate dll stuff... ./misc/fixdll.sh + echo generate dependencies... + #But don't alter the line endings (--quick ensures that) ./fix.sh mingw32 --quick make depend + ./fix.sh msvc --quick make depend + ./fix.sh unix --quick make depend + ./fix.sh djgpp --quick make depend fi *************** *** 70,90 **** ############################################################################# - cd .. echo remove old archives... ! rm -f ccom/ccom$zipversion.zip ! rm -f ccom/ccom-$tgzversion.tar.gz echo create tar.gz archives... tar -cv $afiles | gzip -9 > ccom/ccom-$tgzversion.tar.gz echo create zip archives... ! cd ccom ./fix.sh djgpp --utod ! cd ../ zip -9 ccom/ccom$zipversion.zip $afiles - cd ccom ./fix.sh unix --dtou echo all done! --- 71,110 ---- ############################################################################# echo remove old archives... ! rm -f ccom$zipversion.zip ! rm -f ccom-$tgzversion.tar.gz ! ! # Line endings are still unix in all files, including bat-files. To make the tar archive useful also for ! # Windows users, we change the line endings to DOS/Windows already before packing the tar. This should be ! # no problem for unix users since the bat file has no meaning in unix. ! cp "fix.bat" _tmpfile ! perl -p -i -e "s/([^\r]|^)\n/\1\r\n/" _tmpfile ! touch -r "fix.bat" _tmpfile ! mv _tmpfile "fix.bat" echo create tar.gz archives... + cd .. tar -cv $afiles | gzip -9 > ccom/ccom-$tgzversion.tar.gz + cd ccom echo create zip archives... ! # Change line endings from unix to DOS/Windows before packing the zip archives ./fix.sh djgpp --utod ! cd .. zip -9 ccom/ccom$zipversion.zip $afiles cd ccom + + echo "Archives finished!" + + # Restore correct unix line endings ./fix.sh unix --dtou + # fix.sh omits to change line endings in the bat-file, so we need to change it separately because we want the local + # copy to have the unix style to have the right endings when committing to cvs next time. + mv "fix.bat" _tmpfile + tr -d '\015' < _tmpfile > "fix.bat" + touch -r _tmpfile "fix.bat" + rm _tmpfile + echo all done! |
From: Christer S. <ch...@us...> - 2005-10-29 18:57:18
|
Update of /cvsroot/ccomx/ccom/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19848/include Modified Files: ccom.h Log Message: Set correct line endings in fix* in the distribution package, and improved the scrips to avoid future problems. Index: ccom.h =================================================================== RCS file: /cvsroot/ccomx/ccom/include/ccom.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** ccom.h 21 Sep 2005 18:12:10 -0000 1.9 --- ccom.h 29 Oct 2005 18:57:10 -0000 1.10 *************** *** 4,11 **** #define CCOM_VERSION_MAJOR 0 #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 3 ! #define CCOM_VERSION_STRING "0.9.3" ! #define CCOM_DATE 20050921 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Sep 21, 2005" #include "ccom/ccomcfg.h" --- 4,11 ---- #define CCOM_VERSION_MAJOR 0 #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 4 ! #define CCOM_VERSION_STRING "0.9.4" ! #define CCOM_DATE 20051029 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Oct 29, 2005" #include "ccom/ccomcfg.h" |
From: Christer S. <ch...@us...> - 2005-10-29 18:57:18
|
Update of /cvsroot/ccomx/ccom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19848 Modified Files: fix.sh Log Message: Set correct line endings in fix* in the distribution package, and improved the scrips to avoid future problems. Index: fix.sh =================================================================== RCS file: /cvsroot/ccomx/ccom/fix.sh,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** fix.sh 2 Mar 2003 17:06:00 -0000 1.1.1.1 --- fix.sh 29 Oct 2005 18:57:10 -0000 1.2 *************** *** 1,5 **** #!/bin/sh # ! # Sets up the Adime package for building with the specified compiler, # and if possible converts text files to the desired target format. --- 1,5 ---- #!/bin/sh # ! # Sets up the CCOM package for building with the specified compiler, # and if possible converts text files to the desired target format. *************** *** 12,16 **** echo " mingw32 Win32/MinGW32" echo " msvc Win32/MSVC" - echo " bcc32 Win32/Borland C++" echo " unix Linux/gcc" echo "The other parameters control conversion of text files:" --- 12,15 ---- *************** *** 48,63 **** # common files. CCOM_FILELIST=`find . -type f "(" \ ! -name "*.c" -o -name "*.cfg" -o -name "*.cpp" -o -name "*.def" -o \ ! -name "*.h" -o -name "*.hin" -o -name "*.in" -o -name "*.inc" -o \ ! -name "*.m4" -o -name "*.mft" -o -name "*.s" -o -name "*.rc" -o \ ! -name "*.spec" -o -name "*.pl" -o -name "*.txt" -o -name "*._tx" -o \ ! -name "makefile*" -o -name "readme.*" -o \ ! -name "CHANGES" -o -name "AUTHORS" -o -name "THANKS" \ ")"` - # touch unix shell scripts? if [ "$1" != "omit_sh" ]; then CCOM_FILELIST="$CCOM_FILELIST `find . -type f -name '*.sh'`" fi } --- 47,61 ---- # common files. CCOM_FILELIST=`find . -type f "(" \ ! -name "*.c" -o -name "*.cfg" -o -name "*.def" -o -name "*.h" -o -name "*.t" -o -name "*.ht" -o -name "*.txt" -o -name "*._tx" -o \ ! -name "*.lst" -o -name "makefile*" -o -name "emptymak" -o -name "*.html" \ ")"` if [ "$1" != "omit_sh" ]; then CCOM_FILELIST="$CCOM_FILELIST `find . -type f -name '*.sh'`" fi + + if [ "$1" != "omit_bat" ]; then + CCOM_FILELIST="$CCOM_FILELIST `find . -type f -name '*.bat'`" + fi } *************** *** 78,82 **** { echo "Converting files from DOS/Win32 to Unix..." ! proc_filelist for file in $CCOM_FILELIST; do echo "$file" --- 76,80 ---- { echo "Converting files from DOS/Win32 to Unix..." ! proc_filelist "omit_bat" for file in $CCOM_FILELIST; do echo "$file" *************** *** 118,130 **** case "$1" in - "bcc32" ) proc_fix "Windows (BCC32)" "makefile.bcc";; - "beos" ) proc_noexist "BeOS" "none";; "djgpp" ) proc_fix "DOS (djgpp)" "makefile.dj";; "mingw32" ) proc_fix "Windows (Mingw32)" "makefile.mgw";; "msvc" ) proc_fix "Windows (MSVC)" "makefile.vc";; - "qnx" ) proc_fix "QNX" "none";; "unix" ) proc_fix "Unix" "makefile.uni";; - "mac" ) proc_noexist "Mac" "none";; - "watcom" ) proc_fix "DOS (Watcom)" "none";; "help" ) proc_help;; * ) proc_help;; --- 116,123 ---- |
From: Christer S. <ch...@us...> - 2005-09-21 18:12:20
|
Update of /cvsroot/ccomx/ccom/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15326/docs Modified Files: ccom._tx changes._tx readme._tx Log Message: fixed bug 1297991 Index: ccom._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/ccom._tx,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ccom._tx 8 Nov 2004 21:16:37 -0000 1.7 --- ccom._tx 21 Sep 2005 18:12:08 -0000 1.8 *************** *** 6,10 **** @# @multiwordheaders ! @manh="version 0.9.2" "CCOM" "Manual" @document_title=CCOM Manual @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports --- 6,10 ---- @# @multiwordheaders ! @manh="version 0.9.3" "CCOM" "Manual" @document_title=CCOM Manual @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports *************** *** 32,36 **** <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> <center><b> ! The Manual of CCOM 0.9.2 </b></center> @!text --- 32,36 ---- <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> <center><b> ! The Manual of CCOM 0.9.3 </b></center> @!text Index: readme._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/readme._tx,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** readme._tx 18 Sep 2005 18:33:53 -0000 1.7 --- readme._tx 21 Sep 2005 18:12:09 -0000 1.8 *************** *** 72,76 **** Installation goes in some simple steps, and should be familiar since it is ! similar to the installation procedure as of Allegro and CGUI: <ul> <li> --- 72,76 ---- Installation goes in some simple steps, and should be familiar since it is ! similar to the installation procedure as of CGUI: <ul> <li> *************** *** 87,91 **** fix.bat mingw32 - to compile with Windows/MinGW32 fix.bat msvc - to compile with Windows/MSVC ! ./fix.sh unix - to compile with Linux/gcc </pre> <li> --- 87,91 ---- fix.bat mingw32 - to compile with Windows/MinGW32 fix.bat msvc - to compile with Windows/MSVC ! ./fix.sh unix - to compile with Linux/gcc </pre> <li> *************** *** 101,105 **** export ALLEGRO=/home/user/allegro-4.0.3 </pre> ! or whatever is the name of your allegro directory. <li> Specify the path to your CGUI installation by setting the environment --- 101,110 ---- export ALLEGRO=/home/user/allegro-4.0.3 </pre> ! or whatever is the name of your allegro directory.<br> ! When CCOM is built some programs in the `tools' directory of Allegro will be ! needed, so you have to install an Allegro version built from sources (or ! alternatively obtain the required tools some other way, put them in a ! directory named `tools' and let the variable ALLEGRO point out the directory ! immediately above `tools'). <li> Specify the path to your CGUI installation by setting the environment *************** *** 129,138 **** Compile the library. This is done by running "make" at the command line. <li> ! Install the files to common directories. This is done by running "make install" at the command line.<br> ! Under Linux, you may want to instead run "make install SYSTEM_DIR=<dir>", ! which will cause headers to be installed to <dir>/include and libraries to ! <dir>/lib. (default for <dir> is /usr/local), or else you need to ! run make install as root. </ul> That's it! Now you are ready to run the example program in the example directory. --- 134,153 ---- Compile the library. This is done by running "make" at the command line. <li> ! Install the CCOM files to common directories. This is done by running "make install" at the command line.<br> ! Linux/Unix specifics:<br> ! You need to be root to succeed with the installation command i.e. type the ! command<br> ! <pre> ! su -c "make install" ! </pre> ! and enter the root password when prompted for.<br> ! Alternatively, if you cannot be root you may install CCOM to some other ! location by running "make install SYSTEM_DIR=<dir>", which will cause ! headers to be installed to <dir>/include and libraries to ! <dir>/lib. Default for <dir> is /usr/local.<br> ! To be able to link your program to the CCOM files installed at some other ! location than the default you need to specifiy the paths to your compiler ! and linker. </ul> That's it! Now you are ready to run the example program in the example directory. *************** *** 156,160 **** the static versions of Allegro and CGUI. <li> ! Users of the MSys environment needs to set teh environment vaariable UNIX_TOOLS to 1 before make install is run. <li> --- 171,175 ---- the static versions of Allegro and CGUI. <li> ! Users of the MSys environment needs to set the environment vaariable UNIX_TOOLS to 1 before make install is run. <li> *************** *** 163,170 **** and add "ccom" after the existing "libc" entry (separated by a space). <li> ! To use the ! To use the debugging library, link with libccomd.a instead of libccom.a. </ul> @heading --- 178,189 ---- and add "ccom" after the existing "libc" entry (separated by a space). <li> ! To link your application with the debugging lib, link with -lccomd ! instead of -lccom. </ul> + @heading + MSys + Users of the MSys environment needs to set the environment variable + UNIX_TOOLS to 1 before make install is run. @heading Index: changes._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/changes._tx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** changes._tx 8 Feb 2004 20:47:21 -0000 1.4 --- changes._tx 21 Sep 2005 18:12:09 -0000 1.5 *************** *** 38,42 **** @heading Changes ! 0.9.2: <ul> --- 38,46 ---- @heading Changes ! 0.9.3: ! <ul> ! <li> ! Fixed bug 1297991 "Confusing build instructions" ! </ul> 0.9.2: <ul> |
From: Christer S. <ch...@us...> - 2005-09-21 18:12:18
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15326/misc Modified Files: dllsyms.lst makefile.all makefile.ver zipup.sh Log Message: fixed bug 1297991 Index: makefile.ver =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.ver,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** makefile.ver 8 Nov 2004 21:15:21 -0000 1.7 --- makefile.ver 21 Sep 2005 18:12:10 -0000 1.8 *************** *** 7,10 **** # Shared library versions for Unix # todo: this is unused at the moment ! shared_version = 0.9.2 shared_major_minor = 0.9 --- 7,10 ---- # Shared library versions for Unix # todo: this is unused at the moment ! shared_version = 0.9.3 shared_major_minor = 0.9 Index: makefile.all =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.all,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** makefile.all 18 Sep 2005 18:33:54 -0000 1.11 --- makefile.all 21 Sep 2005 18:12:10 -0000 1.12 *************** *** 6,10 **** # See readme.txt for more information about CCOM. # - # # Available options: # --- 6,9 ---- *************** *** 18,44 **** # docs: Build only the documentation. # clean: Remove rebuildable files. ! # compress: Compress the example executable using upx. ! # uninstall: Uninstalls the header files of CCOM and all brands of the lib that has been installed. # help: Display this help. # # Developer Targets: # ! # texts: Builds the textfile and the includefile(s) *.ht from *.t # This should actually be part of the default build but ! # for the user conveniance (it needs CGUIDIR to be set) it is pre-built. ! # depend: Regenerate dependencies. # veryclean: Remove rebuildable files, including dependencies. ! # rewhisp: Reformat all text files to unix format using whisped. ! # rewhisp-dos: Reformat all text files to dos format using whisped. ! # zipupd-big: Create developer zip with additional stuff from dos. # # Variables: # # DEBUGMODE=1 Include debug info in the library. # CCOM_FORTIFY=1 Include memory debugger. Sources are not included in the distribution # c-files are assumed to be located in src and h-files in include. ## - include misc/makefile.ver --- 17,47 ---- # docs: Build only the documentation. # clean: Remove rebuildable files. ! # compress: Compress the example executable using the executable compressing program pointed to by UPX_PROGRAM. # help: Display this help. # # Developer Targets: # ! # dat: Builds the textfile and the includefile(s) *.ht from *.t # This should actually be part of the default build but ! # for the user conveniance it is pre-built. This is needed to build a lib using code ! # checked out from cvs. This target needs the environment variable CGUIDIR to point ! # to the directory of CGUI, and ALLEGRO to point to the directory of Allegro. ! # depend: Regenerate dependencies. This is needed to build a lib using code checked out from cvs. # veryclean: Remove rebuildable files, including dependencies. ! # rewhisp: Reformat all text files to unix format using whisped. This requires the whisped program to in your path. ! # rewhisp-dos: Reformat all text files to dos format using whisped. This requires the whisped program to in your path. # # Variables: # + # ALLEGRO=<directoy-of-allegro-source> See target `dat' above. + # CGUIDIR=<directoy-of-cgui> Needed by target `dat', see above. + # + # UPX_PROGRAM=<program-to-compress-with> See target `compress' above. # DEBUGMODE=1 Include debug info in the library. # CCOM_FORTIFY=1 Include memory debugger. Sources are not included in the distribution # c-files are assumed to be located in src and h-files in include. + # ## include misc/makefile.ver *************** *** 98,102 **** docs/ccom.txt docs/ccom$(HTML_SUFFIX) docs/ccom$(INFO_SUFFIX) docs/ccom.rtf \ docs/internal.txt docs/internal$(HTML_SUFFIX) docs/internal$(INFO_SUFFIX) docs/internal.rtf \ ! readme.txt readme.html docs/readme$(INFO_SUFFIX) \ docs/changes.txt docs/changes$(HTML_SUFFIX) --- 101,105 ---- docs/ccom.txt docs/ccom$(HTML_SUFFIX) docs/ccom$(INFO_SUFFIX) docs/ccom.rtf \ docs/internal.txt docs/internal$(HTML_SUFFIX) docs/internal$(INFO_SUFFIX) docs/internal.rtf \ ! readme.txt readme$(HTML_SUFFIX) docs/readme$(INFO_SUFFIX) \ docs/changes.txt docs/changes$(HTML_SUFFIX) *************** *** 115,119 **** # -------- Compile -------- ! .PHONY: default all lib examples docs clean compress donemsg texts .PRECIOUS: docs/%$(TEXI_SUFFIX) $(OBJ_DIR)/%$(OBJ_SUFFIX) --- 118,122 ---- # -------- Compile -------- ! .PHONY: default all lib examples docs clean compress donemsg dat .PRECIOUS: docs/%$(TEXI_SUFFIX) $(OBJ_DIR)/%$(OBJ_SUFFIX) Index: dllsyms.lst =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/dllsyms.lst,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dllsyms.lst 2 Mar 2003 17:06:10 -0000 1.1.1.1 --- dllsyms.lst 21 Sep 2005 18:12:10 -0000 1.2 *************** *** 1,11 **** ! CCPSendBuffer ! CCPSetBaud ! CCPSetBits ! CCPSetParity ! CCPSetParityEnable ! CCPSetPath ! CCPSetStopBits ! CCPSettingsDialogue ! CCPStartScanning ! CCPStopScanning ! CCPStopSending --- 1,12 ---- ! CcomLoopBackMode ! CcomSendBuffer ! CcomSetBaud ! CcomSetBits ! CcomSetParity ! CcomSetParityEnable ! CcomSetPath ! CcomSetStopBits ! CcomSettingsDialogue ! CcomStartScanning ! CcomStopScanning ! CcomStopSending Index: zipup.sh =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/zipup.sh,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** zipup.sh 18 Sep 2005 18:33:54 -0000 1.8 --- zipup.sh 21 Sep 2005 18:12:10 -0000 1.9 *************** *** 12,17 **** # note: these are patched by fixver.sh script. ! zipversion=092 ! tgzversion=0.9.2 if [ "$1" != "-q" ]; then --- 12,17 ---- # note: these are patched by fixver.sh script. ! zipversion=093 ! tgzversion=0.9.3 if [ "$1" != "-q" ]; then *************** *** 40,45 **** ./fix.sh djgpp --quick make depend ! ./fix.sh bcc32 --quick ! make depend ./fix.sh djgpp --quick fi --- 40,45 ---- ./fix.sh djgpp --quick make depend ! # ./fix.sh bcc32 --quick ! # make depend ./fix.sh djgpp --quick fi *************** *** 47,51 **** echo generate other files for the distribution... make docs "LFN=y" ! make texts fi --- 47,51 ---- echo generate other files for the distribution... make docs "LFN=y" ! make dat fi *************** *** 74,78 **** echo remove old archives... rm -f ccom/ccom$zipversion.zip ! rm -f ccom/ccom-$tgzversion.tgz echo create tar.gz archives... --- 74,78 ---- echo remove old archives... rm -f ccom/ccom$zipversion.zip ! rm -f ccom/ccom-$tgzversion.tar.gz echo create tar.gz archives... |
From: Christer S. <ch...@us...> - 2005-09-21 18:12:18
|
Update of /cvsroot/ccomx/ccom/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15326/include Modified Files: ccom.h Log Message: fixed bug 1297991 Index: ccom.h =================================================================== RCS file: /cvsroot/ccomx/ccom/include/ccom.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** ccom.h 8 Nov 2004 21:17:48 -0000 1.8 --- ccom.h 21 Sep 2005 18:12:10 -0000 1.9 *************** *** 4,11 **** #define CCOM_VERSION_MAJOR 0 #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 2 ! #define CCOM_VERSION_STRING "0.9.2" ! #define CCOM_DATE 20040611 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Jun 11, 2004" #include "ccom/ccomcfg.h" --- 4,11 ---- #define CCOM_VERSION_MAJOR 0 #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 3 ! #define CCOM_VERSION_STRING "0.9.3" ! #define CCOM_DATE 20050921 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Sep 21, 2005" #include "ccom/ccomcfg.h" |
From: SourceForge.net <no...@so...> - 2005-09-21 18:08:19
|
Bugs item #1297991, was opened at 2005-09-21 18:08 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542638&aid=1297991&group_id=75004 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Platform independent Group: MainBranch Status: Open Resolution: None Priority: 5 Submitted By: Christer Sandberg (chrisan) Assigned to: Christer Sandberg (chrisan) Summary: Confusing build instructions Initial Comment: The build instructions are incomplete, erroneous and inconsistent in readme and makefile.all. Minor bugs in zipup.sh. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=542638&aid=1297991&group_id=75004 |
From: Christer S. <ch...@us...> - 2005-09-18 18:34:05
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5670/misc Modified Files: makefile.all zipup.sh Log Message: some more details fixed regarding build and docs Index: makefile.all =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.all,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** makefile.all 8 Nov 2004 21:15:21 -0000 1.10 --- makefile.all 18 Sep 2005 18:33:54 -0000 1.11 *************** *** 98,103 **** docs/ccom.txt docs/ccom$(HTML_SUFFIX) docs/ccom$(INFO_SUFFIX) docs/ccom.rtf \ docs/internal.txt docs/internal$(HTML_SUFFIX) docs/internal$(INFO_SUFFIX) docs/internal.rtf \ ! docs/readme.txt docs/readme$(INFO_SUFFIX) \ ! docs/changes.txt docs/changes$(HTML_SUFFIX) ifndef HAVE_TEXINFO --- 98,103 ---- docs/ccom.txt docs/ccom$(HTML_SUFFIX) docs/ccom$(INFO_SUFFIX) docs/ccom.rtf \ docs/internal.txt docs/internal$(HTML_SUFFIX) docs/internal$(INFO_SUFFIX) docs/internal.rtf \ ! readme.txt readme.html docs/readme$(INFO_SUFFIX) \ ! docs/changes.txt docs/changes$(HTML_SUFFIX) ifndef HAVE_TEXINFO *************** *** 165,174 **** $(LINK_OBJ_TO_LIB) ! examples/%$(EXE_SUFFIX): $(OBJ_DIR)/%$(OBJ_SUFFIX) $(LIB_NAME) $(LINK_OBJ_TO_EXE) chm-docs: docs/ccom.chm ! docs/%.txt: docs/%._tx -$(MAKEDOC_PROGRAM) -ascii $@ $< --- 165,174 ---- $(LINK_OBJ_TO_LIB) ! examples/%$(EXE_SUFFIX): $(OBJ_DIR)/%$(OBJ_SUFFIX) $(LIB_NAME) $(LINK_OBJ_TO_EXE) chm-docs: docs/ccom.chm ! %.txt: docs/%._tx -$(MAKEDOC_PROGRAM) -ascii $@ $< *************** *** 176,179 **** --- 176,182 ---- -$(MAKEDOC_PROGRAM) -ascii $@ $< + %$(HTML_SUFFIX): docs/%._tx + -$(MAKEDOC_PROGRAM) $(_TX_HTML_FLAG) $@ $< + docs/%$(HTML_SUFFIX): docs/%._tx -$(MAKEDOC_PROGRAM) $(_TX_HTML_FLAG) $@ $< Index: zipup.sh =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/zipup.sh,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** zipup.sh 21 Jun 2004 19:17:54 -0000 1.7 --- zipup.sh 18 Sep 2005 18:33:54 -0000 1.8 *************** *** 19,24 **** echo clean up... ./fix.sh djgpp --dtou ! #make clean ! make rewhisp # Dont generate dependencies if a parameter was given. --- 19,23 ---- echo clean up... ./fix.sh djgpp --dtou ! make clean # Dont generate dependencies if a parameter was given. *************** *** 65,71 **** examples/*.c examples/*.cfg \ resource/*.dat resource/ccomlabl \ ! include/*.h include/ccom/*.h \ ! misc/runner.c \ ! misc/makedoc/*.c misc/makedoc/*.h" afiles=`echo $files | sed -e"s/\([^ ][^ ]*\)/ ccom\/\1/g"` --- 64,68 ---- examples/*.c examples/*.cfg \ resource/*.dat resource/ccomlabl \ ! include/*.h include/ccom/*.h" afiles=`echo $files | sed -e"s/\([^ ][^ ]*\)/ ccom\/\1/g"` |
From: Christer S. <ch...@us...> - 2005-09-18 18:34:05
|
Update of /cvsroot/ccomx/ccom/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5670/docs Modified Files: readme._tx Log Message: some more details fixed regarding build and docs Index: readme._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/readme._tx,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** readme._tx 8 Nov 2004 21:16:37 -0000 1.6 --- readme._tx 18 Sep 2005 18:33:53 -0000 1.7 *************** *** 79,83 **** i.e. enter the command <pre> ! cd c:\cbar </pre> or whatever is the name of your ccom directory. Then choose platform by --- 79,83 ---- i.e. enter the command <pre> ! cd c:\ccom </pre> or whatever is the name of your ccom directory. Then choose platform by *************** *** 122,126 **** make mktext </pre> ! Return to the main directory of cbar, e.g.: <pre> cd c:\ccom --- 122,126 ---- make mktext </pre> ! Return to the main directory of CCOM, e.g.: <pre> cd c:\ccom |
From: Christer S. <ch...@us...> - 2005-09-18 17:15:56
|
Update of /cvsroot/ccomx/ccom/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21771/src Modified Files: comunix.c Log Message: removed dbug printouts Index: comunix.c =================================================================== RCS file: /cvsroot/ccomx/ccom/src/comunix.c,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comunix.c 16 Feb 2004 07:20:20 -0000 1.2 --- comunix.c 18 Sep 2005 17:15:44 -0000 1.3 *************** *** 1,150 **** ! /* Module COMUNIX ! This module contains the asynchronous commounication basics for ! UNIX only. */ ! #include <allegro.h> ! #ifdef ALLEGRO_UNIX ! ! #include <cgui.h> ! #include <termios.h> ! #include <sys/types.h> ! #include <sys/stat.h> ! #include <unistd.h> ! ! #include "common.h" ! #include "comx.h" ! #include "labldata.h" ! #include "dialser.ht" ! ! #define NR_FILE_ALTERANTIVES 6 ! static int OpenPort(t_serport *port) ! { ! static char *file_names[NR_FILE_ALTERANTIVES][4]={ ! {"/dev/tts/0", "/dev/tts/1", "/dev/tts/2", "/dev/tts/3"}, ! {"/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3"}, ! {"/dev/ttyf1", "/dev/ttyf2", "/dev/ttyf3", "/dev/ttyf4"}, ! {"/dev/ttya", "/dev/ttyb", "/dev/ttyc", "/dev/ttyd"}, ! {"/dev/tty1p0", "/dev/tty2p0", "/dev/tty3p0", "/dev/tty4p0"}, ! {"/dev/tty01", "/dev/tty02", "/dev/tty03", "/dev/tty04"}}; ! int i; ! ! if (port->fd > 0) ! return 1; ! if (port->fd < 0) ! return 0; ! for (i=0; i<NR_FILE_ALTERANTIVES; i++) { ! struct stat buf; ! if (stat(file_names[i][port->portno], &buf) == 0) { ! /* File exists */ ! port->fd = open(file_names[i][port->portno], O_RDWR | O_NOCTTY | O_NDELAY); ! if (port->fd > 0) { ! fcntl(port->fd, F_SETFL, FNDELAY); ! return 1; ! } else { ! static const char * const * txt; ! char s[1000]; ! int nr; ! txt = LoadCompiledTexts(ccom_labels, "dialser", &nr); ! sprintf(s, txt[L_ERROR_ACCESS_RIGHTS], port->portno+1, file_names[i][port->portno]); ! Req("", s); ! } ! } ! } ! return 0; ! } ! ! extern int _CcomReadPort(t_serport *port, unsigned char *c, unsigned char *error) ! { ! int n = 0; ! ! if (port->fd == 0) ! OpenPort(port); ! *error = 0; ! n = read(port->fd, &c, 1); ! if (n < 0) { ! n = 0; ! *error = 1; ! } ! if (n) { ! char s[100]; ! sprintf(s, "number:%2x|OK", n); ! Req("",s);} ! return n; ! } ! ! extern int _CcomWritePort(t_serport *port, int c) ! { ! int n = 0; ! ! if (port->fd == 0) ! OpenPort(port); ! n = write(port->fd, &c, 1); ! return n; ! } ! ! extern void _CcomSetBaud(t_serport *port) ! { ! struct termios options; ! int baud; ! ! tcgetattr(port->fd, &options); ! switch (port->baud_rate) { ! case 50: baud = B50; break; ! case 75: baud = B75; break; ! case 110: baud = B110; break; ! case 134: baud = B134; break; ! case 150: baud = B150; break; ! case 200: baud = B200; break; ! case 300: baud = B300; break; ! case 600: baud = B600; break; ! case 1200: baud = B1200; break; ! case 1800: baud = B1800; break; ! case 2400: baud = B2400; break; ! case 4800: baud = B4800; break; ! case 9600: baud = B9600; break; ! case 19200: baud = B19200; break; ! case 38400: baud = B38400; break; ! case 57600: baud = B57600; break; ! case 115200: baud = B115200; break; ! case 230400: baud = B230400; break; ! default: baud = B0; break; ! } ! cfsetispeed(&options, baud); ! cfsetospeed(&options, baud); ! options.c_cflag |= (CLOCAL | CREAD); ! tcsetattr(port->fd, TCSANOW, &options); ! } ! ! extern void _CcomApplySettingsToPort(t_serport *port) ! { ! struct termios options; ! ! tcgetattr(port->fd, &options); ! options.c_cflag &= ~CSIZE; ! options.c_cflag &= ~CSTOPB; ! options.c_cflag &= ~PARENB; ! options.c_cflag &= ~PARODD; ! options.c_iflag &= ~(INPCK | ISTRIP); ! switch (port->nobits) { ! case 5: options.c_cflag |= CS5; break; ! case 6: options.c_cflag |= CS6; break; ! case 7: options.c_cflag |= CS7; break; ! default: options.c_cflag |= CS8; break; ! } ! if (port->parityena) { ! options.c_cflag |= PARENB; ! options.c_iflag |= INPCK | ISTRIP; ! } ! if (port->parity==0) ! options.c_cflag |= PARODD; ! if (port->stopbits==2) ! options.c_cflag |= CSTOPB; ! options.c_cflag |= CLOCAL | CREAD; ! options.c_lflag &= ~ICANON | ECHO | ECHOE | ISIG; ! options.c_oflag &= ~OPOST; ! tcsetattr(port->fd, TCSANOW, &options); ! } ! ! extern void _CcomLoopBackMode(t_serport *port, int mode) ! { ! } ! #endif --- 1,146 ---- ! /* Module COMUNIX ! This module contains the asynchronous commounication basics for ! UNIX only. */ ! #include <allegro.h> ! #ifdef ALLEGRO_UNIX ! ! #include <cgui.h> ! #include <termios.h> ! #include <sys/types.h> ! #include <sys/stat.h> ! #include <unistd.h> ! ! #include "common.h" ! #include "comx.h" ! #include "labldata.h" ! #include "dialser.ht" ! ! #define NR_FILE_ALTERANTIVES 6 ! static int OpenPort(t_serport *port) ! { ! static char *file_names[NR_FILE_ALTERANTIVES][4]={ ! {"/dev/tts/0", "/dev/tts/1", "/dev/tts/2", "/dev/tts/3"}, ! {"/dev/ttyS0", "/dev/ttyS1", "/dev/ttyS2", "/dev/ttyS3"}, ! {"/dev/ttyf1", "/dev/ttyf2", "/dev/ttyf3", "/dev/ttyf4"}, ! {"/dev/ttya", "/dev/ttyb", "/dev/ttyc", "/dev/ttyd"}, ! {"/dev/tty1p0", "/dev/tty2p0", "/dev/tty3p0", "/dev/tty4p0"}, ! {"/dev/tty01", "/dev/tty02", "/dev/tty03", "/dev/tty04"}}; ! int i; ! ! if (port->fd > 0) ! return 1; ! if (port->fd < 0) ! return 0; ! for (i=0; i<NR_FILE_ALTERANTIVES; i++) { ! struct stat buf; ! if (stat(file_names[i][port->portno], &buf) == 0) { ! /* File exists */ ! port->fd = open(file_names[i][port->portno], O_RDWR | O_NOCTTY | O_NDELAY); ! if (port->fd > 0) { ! fcntl(port->fd, F_SETFL, FNDELAY); ! return 1; ! } else { ! static const char * const * txt; ! char s[1000]; ! int nr; ! txt = LoadCompiledTexts(ccom_labels, "dialser", &nr); ! sprintf(s, txt[L_ERROR_ACCESS_RIGHTS], port->portno+1, file_names[i][port->portno]); ! Req("", s); ! } ! } ! } ! return 0; ! } ! ! extern int _CcomReadPort(t_serport *port, unsigned char *c, unsigned char *error) ! { ! int n = 0; ! ! if (port->fd == 0) ! OpenPort(port); ! *error = 0; ! n = read(port->fd, &c, 1); ! if (n < 0) { ! n = 0; ! *error = 1; ! } ! return n; ! } ! ! extern int _CcomWritePort(t_serport *port, int c) ! { ! int n = 0; ! ! if (port->fd == 0) ! OpenPort(port); ! n = write(port->fd, &c, 1); ! return n; ! } ! ! extern void _CcomSetBaud(t_serport *port) ! { ! struct termios options; ! int baud; ! ! tcgetattr(port->fd, &options); ! switch (port->baud_rate) { ! case 50: baud = B50; break; ! case 75: baud = B75; break; ! case 110: baud = B110; break; ! case 134: baud = B134; break; ! case 150: baud = B150; break; ! case 200: baud = B200; break; ! case 300: baud = B300; break; ! case 600: baud = B600; break; ! case 1200: baud = B1200; break; ! case 1800: baud = B1800; break; ! case 2400: baud = B2400; break; ! case 4800: baud = B4800; break; ! case 9600: baud = B9600; break; ! case 19200: baud = B19200; break; ! case 38400: baud = B38400; break; ! case 57600: baud = B57600; break; ! case 115200: baud = B115200; break; ! case 230400: baud = B230400; break; ! default: baud = B0; break; ! } ! cfsetispeed(&options, baud); ! cfsetospeed(&options, baud); ! options.c_cflag |= (CLOCAL | CREAD); ! tcsetattr(port->fd, TCSANOW, &options); ! } ! ! extern void _CcomApplySettingsToPort(t_serport *port) ! { ! struct termios options; ! ! tcgetattr(port->fd, &options); ! options.c_cflag &= ~CSIZE; ! options.c_cflag &= ~CSTOPB; ! options.c_cflag &= ~PARENB; ! options.c_cflag &= ~PARODD; ! options.c_iflag &= ~(INPCK | ISTRIP); ! switch (port->nobits) { ! case 5: options.c_cflag |= CS5; break; ! case 6: options.c_cflag |= CS6; break; ! case 7: options.c_cflag |= CS7; break; ! default: options.c_cflag |= CS8; break; ! } ! if (port->parityena) { ! options.c_cflag |= PARENB; ! options.c_iflag |= INPCK | ISTRIP; ! } ! if (port->parity==0) ! options.c_cflag |= PARODD; ! if (port->stopbits==2) ! options.c_cflag |= CSTOPB; ! options.c_cflag |= CLOCAL | CREAD; ! options.c_lflag &= ~ICANON | ECHO | ECHOE | ISIG; ! options.c_oflag &= ~OPOST; ! tcsetattr(port->fd, TCSANOW, &options); ! } ! ! extern void _CcomLoopBackMode(t_serport *port, int mode) ! { ! } ! #endif |
From: Christer S. <ch...@us...> - 2005-09-18 17:15:55
|
Update of /cvsroot/ccomx/ccom/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21771/examples Modified Files: 1_com.c allegro.cfg Log Message: removed dbug printouts Index: 1_com.c =================================================================== RCS file: /cvsroot/ccomx/ccom/examples/1_com.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 1_com.c 16 Feb 2004 07:20:19 -0000 1.4 --- 1_com.c 18 Sep 2005 17:15:44 -0000 1.5 *************** *** 1,133 **** ! /* This example shows how to use CCOM for accessing the serial port */ ! ! #include<allegro.h> ! #include <cgui.h> ! #include <cgui/mem.h> ! #include "ccom.h" ! #include <string.h> ! ! typedef struct t_portdata { ! char *rec, *send; ! int id, nr, scan, loopback; ! } t_portdata; ! ! static void receive(int portnr nouse, int readdata, int error nouse, void *data) ! { ! t_portdata *pd = data; ! int len = 2; ! char s[100]; ! sprintf(s, "%2x|OK", readdata); ! Req("",s); ! if (pd->rec) ! len += strlen(pd->rec); ! pd->rec = ResizeMem(char, pd->rec, len); ! pd->rec[len-2] = readdata; ! pd->rec[len-1] = 0; ! Refresh(pd->id); ! } ! ! static void scanning(void *data) ! { ! t_portdata *pd = data; ! ! if (pd->scan) ! CcomStartScanning(pd->nr, 0, receive, pd); ! else ! CcomStopScanning(pd->nr); ! } ! ! static void do_send(void *data) ! { ! t_portdata *pd = data; ! ! if (pd->send && *pd->send) ! CcomSendBuffer(pd->nr, pd->send, strlen(pd->send), NULL, NULL); ! } ! ! static void shut_down(void *data nouse) ! { ! StopProcessEvents(); ! } ! ! static void com_settings(void *data) ! { ! t_portdata *pd = data; ! CcomSettingsDialogue(pd->nr); ! } ! ! static void switch_loop_back_mode(void *data) ! { ! t_portdata *pd = data; ! CcomLoopBackMode(pd->nr, pd->loopback); ! } ! ! static void add_port_container(t_portdata *pd, int i) ! { ! int id, nrs[]={CCOM_COM1, CCOM_COM2, CCOM_COM3, CCOM_COM4}; ! char s[100]; ! ! pd->nr = nrs[i]; ! sprintf(s, "COM%d", i+1); ! StartContainer(DOWNLEFT, ADAPTIVE, s, CT_BORDER); ! AddButton(DOWNLEFT, "Port settings", com_settings, pd); ! pd->id = AddEditBox(DOWNLEFT, 300, "Received bytes:", FPTRSTR, 0, &pd->rec); ! id = AddCheck(RIGHT, "Scan port", &pd->scan); ! AddHandler(id, scanning, pd); ! AddEditBox(DOWNLEFT, 300, "Bytes to send:", FPTRSTR, 0, &pd->send); ! AddButton(RIGHT, " Send ", do_send, pd); ! id = AddCheck(DOWNLEFT, "Loop back mode", &pd->loopback); ! AddHandler(id, switch_loop_back_mode, pd); ! ! EndContainer(); ! } ! ! static void example_info(void *data nouse) ! { ! MkDialogue(ADAPTIVE, "Info window", W_FLOATING); ! AddTextBox(TOPLEFT, "This examples shows how to use CCOM._" ! "To make it meaningful you need to connect some equipment to some of" ! "the serial ports of your computer, and then set yor your computers port" ! "settings to the same values used by the connected equipment. Therefore" ! "you must know these settings._" ! "Specially you can connect two computers, one i each end of the line." ! "This requires another type of cable than the cable used for e.g. modems.", ! 400, 0, TB_FRAMESINK|TB_LINEFEED_); ! AddButton(DOWNLEFT, "Close", CloseWin, NULL); ! DisplayWin(); ! } ! ! static void show_code(void *data nouse) ! { ! int id; ! ! MkDialogue(ADAPTIVE, "Code view", W_FLOATING); ! id = AddTextBox(DOWNLEFT, "1_com.c", 670, 54, TB_TEXTFILE|TB_FRAMESINK|TB_PREFORMAT|3); ! MakeStretchable(id, NULL, NULL, 0); ! AddButton(DOWNLEFT, "Close", CloseWin, NULL); ! DisplayWin(); ! } ! ! int main(void) ! { ! static t_portdata pd[4]; ! int i; ! ! InitCguiWindowedMode(); ! //InitCgui(640, 480, 16); ! MkDialogue(ADAPTIVE, "Serial communication example", 0); ! AddButton(DOWNLEFT, "E~xit", shut_down, pd); ! AddButton(RIGHT, "Example info", example_info, NULL); ! AddButton(RIGHT, "Show code", show_code, NULL); ! /* Too many similar labels, turn off or else infinite searching */ ! AutoHotKeys(0); ! for (i=0; i<4; i++) ! add_port_container(pd + i, i); ! DisplayWin(); ! ProcessEvents(); ! for (i=0; i<4; i++) { ! Release(pd[i].rec); ! Release(pd[i].send); ! } ! return 0; ! } ! END_OF_MAIN(); --- 1,130 ---- ! /* This example shows how to use CCOM for accessing the serial port */ ! ! #include<allegro.h> ! #include <cgui.h> ! #include <cgui/mem.h> ! #include "ccom.h" ! #include <string.h> ! ! typedef struct t_portdata { ! char *rec, *send; ! int id, nr, scan, loopback; ! } t_portdata; ! ! static void receive(int portnr nouse, int readdata, int error nouse, void *data) ! { ! t_portdata *pd = data; ! int len = 2; ! if (pd->rec) ! len += strlen(pd->rec); ! pd->rec = ResizeMem(char, pd->rec, len); ! pd->rec[len-2] = readdata; ! pd->rec[len-1] = 0; ! Refresh(pd->id); ! } ! ! static void scanning(void *data) ! { ! t_portdata *pd = data; ! ! if (pd->scan) ! CcomStartScanning(pd->nr, 0, receive, pd); ! else ! CcomStopScanning(pd->nr); ! } ! ! static void do_send(void *data) ! { ! t_portdata *pd = data; ! ! if (pd->send && *pd->send) ! CcomSendBuffer(pd->nr, pd->send, strlen(pd->send), NULL, NULL); ! } ! ! static void shut_down(void *data nouse) ! { ! StopProcessEvents(); ! } ! ! static void com_settings(void *data) ! { ! t_portdata *pd = data; ! CcomSettingsDialogue(pd->nr); ! } ! ! static void switch_loop_back_mode(void *data) ! { ! t_portdata *pd = data; ! CcomLoopBackMode(pd->nr, pd->loopback); ! } ! ! static void add_port_container(t_portdata *pd, int i) ! { ! int id, nrs[]={CCOM_COM1, CCOM_COM2, CCOM_COM3, CCOM_COM4}; ! char s[100]; ! ! pd->nr = nrs[i]; ! sprintf(s, "COM%d", i+1); ! StartContainer(DOWNLEFT, ADAPTIVE, s, CT_BORDER); ! AddButton(DOWNLEFT, "Port settings", com_settings, pd); ! pd->id = AddEditBox(DOWNLEFT, 300, "Received bytes:", FPTRSTR, 0, &pd->rec); ! id = AddCheck(RIGHT, "Scan port", &pd->scan); ! AddHandler(id, scanning, pd); ! AddEditBox(DOWNLEFT, 300, "Bytes to send:", FPTRSTR, 0, &pd->send); ! AddButton(RIGHT, " Send ", do_send, pd); ! id = AddCheck(DOWNLEFT, "Loop back mode", &pd->loopback); ! AddHandler(id, switch_loop_back_mode, pd); ! ! EndContainer(); ! } ! ! static void example_info(void *data nouse) ! { ! MkDialogue(ADAPTIVE, "Info window", W_FLOATING); ! AddTextBox(TOPLEFT, "This examples shows how to use CCOM._" ! "To make it meaningful you need to connect some equipment to some of" ! "the serial ports of your computer, and then set yor your computers port" ! "settings to the same values used by the connected equipment. Therefore" ! "you must know these settings._" ! "Specially you can connect two computers, one i each end of the line." ! "This requires another type of cable than the cable used for e.g. modems.", ! 400, 0, TB_FRAMESINK|TB_LINEFEED_); ! AddButton(DOWNLEFT, "Close", CloseWin, NULL); ! DisplayWin(); ! } ! ! static void show_code(void *data nouse) ! { ! int id; ! ! MkDialogue(ADAPTIVE, "Code view", W_FLOATING); ! id = AddTextBox(DOWNLEFT, "1_com.c", 670, 54, TB_TEXTFILE|TB_FRAMESINK|TB_PREFORMAT|3); ! MakeStretchable(id, NULL, NULL, 0); ! AddButton(DOWNLEFT, "Close", CloseWin, NULL); ! DisplayWin(); ! } ! ! int main(void) ! { ! static t_portdata pd[4]; ! int i; ! ! InitCguiWindowedMode(); ! //InitCgui(640, 480, 16); ! MkDialogue(ADAPTIVE, "Serial communication example", 0); ! AddButton(DOWNLEFT, "E~xit", shut_down, pd); ! AddButton(RIGHT, "Example info", example_info, NULL); ! AddButton(RIGHT, "Show code", show_code, NULL); ! /* Too many similar labels, turn off or else infinite searching */ ! AutoHotKeys(0); ! for (i=0; i<4; i++) ! add_port_container(pd + i, i); ! DisplayWin(); ! ProcessEvents(); ! for (i=0; i<4; i++) { ! Release(pd[i].rec); ! Release(pd[i].send); ! } ! return 0; ! } ! END_OF_MAIN(); Index: allegro.cfg =================================================================== RCS file: /cvsroot/ccomx/ccom/examples/allegro.cfg,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** allegro.cfg 8 Feb 2004 20:47:21 -0000 1.4 --- allegro.cfg 18 Sep 2005 17:15:44 -0000 1.5 *************** *** 1,35 **** ! [system] ! language = en ! keyboard = us ! ! [cgui] ! language = en ! ! [cgui:screen-res] ! Width = 800 ! Height = 600 ! Colour_depth = 24 ! ! [COM2] ! Baud-rate = 9600 ! Parity = 1 ! Parity-enabled = 1 ! Stopbits = 2 ! Bits = 7 ! Interrupt-control = 0 ! IRQ-nr = 0 ! Flow-control = 0 ! Buffer-size = 0 ! Port-address = 2F8 ! ! [COM1] ! Baud-rate = 9600 ! Parity = 1 ! Parity-enabled = 1 ! Stopbits = 2 ! Bits = 7 ! Interrupt-control = 0 ! IRQ-nr = 0 ! Flow-control = 0 ! Buffer-size = 0 ! Port-address = 3F8 --- 1,35 ---- ! [system] ! language = en ! keyboard = us ! ! [cgui] ! language = en ! ! [cgui:screen-res] ! Width = 800 ! Height = 600 ! Colour_depth = 24 ! ! [COM2] ! Baud-rate = 9600 ! Parity = 1 ! Parity-enabled = 1 ! Stopbits = 2 ! Bits = 7 ! Interrupt-control = 0 ! IRQ-nr = 0 ! Flow-control = 0 ! Buffer-size = 0 ! Port-address = 2F8 ! ! [COM1] ! Baud-rate = 9600 ! Parity = 0 ! Parity-enabled = 1 ! Stopbits = 2 ! Bits = 7 ! Interrupt-control = 0 ! IRQ-nr = 0 ! Flow-control = 0 ! Buffer-size = 0 ! Port-address = 3F8 |
From: Rasmus M. <ras...@us...> - 2004-11-08 21:17:59
|
Update of /cvsroot/ccomx/ccom/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1726 Modified Files: ccom.h Log Message: Line endings Index: ccom.h =================================================================== RCS file: /cvsroot/ccomx/ccom/include/ccom.h,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ccom.h 21 Jun 2004 19:17:54 -0000 1.7 --- ccom.h 8 Nov 2004 21:17:48 -0000 1.8 *************** *** 1,37 **** ! #ifndef CCOM_H ! #define CCOM_H ! ! #define CCOM_VERSION_MAJOR 0 ! #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 2 ! #define CCOM_VERSION_STRING "0.9.2" ! #define CCOM_DATE 20040611 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Jun 11, 2004" ! ! #include "ccom/ccomcfg.h" ! ! #define CCOM_COM1 0 ! #define CCOM_COM2 1 ! #define CCOM_COM3 2 ! #define CCOM_COM4 3 ! ! #define CCOM_ERR_ORUN (1 << 0) ! #define CCOM_ERR_PAR (1 << 1) ! #define CCOM_ERR_FRAME (1 << 2) ! ! CCOM_FUNC(int, CcomSettingsDialogue, (int portno)); ! CCOM_FUNC(int, CcomSendBuffer, (int portnr, const char *buffer, int n, CCOM_METHOD(void, Notify, (int portnr, void *data)), void *data)); ! CCOM_FUNC(int, CcomStartScanning, (int portnr, int options, CCOM_METHOD(void, CallBack, (int portnr, int readdata, int error, void *data)), void *data)); ! CCOM_FUNC(void, CcomSetPath, (const char *path)); ! ! CCOM_FUNC(int, CcomStopSending, (int portno)); ! CCOM_FUNC(int, CcomStopScanning, (int portno)); ! ! CCOM_FUNC(int, CcomSetBaud, (int portno, long baud_rate)); ! CCOM_FUNC(int, CcomSetBits, (int portno, int nobits)); ! CCOM_FUNC(int, CcomSetStopBits, (int portno, int stopbits)); ! CCOM_FUNC(int, CcomSetParity, (int portno, int parity)); ! CCOM_FUNC(int, CcomSetParityEnable, (int portno, int parityenable)); ! CCOM_FUNC(void, CcomLoopBackMode, (int portno, int mode)); ! ! #endif --- 1,37 ---- ! #ifndef CCOM_H ! #define CCOM_H ! ! #define CCOM_VERSION_MAJOR 0 ! #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 2 ! #define CCOM_VERSION_STRING "0.9.2" ! #define CCOM_DATE 20040611 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Jun 11, 2004" ! ! #include "ccom/ccomcfg.h" ! ! #define CCOM_COM1 0 ! #define CCOM_COM2 1 ! #define CCOM_COM3 2 ! #define CCOM_COM4 3 ! ! #define CCOM_ERR_ORUN (1 << 0) ! #define CCOM_ERR_PAR (1 << 1) ! #define CCOM_ERR_FRAME (1 << 2) ! ! CCOM_FUNC(int, CcomSettingsDialogue, (int portno)); ! CCOM_FUNC(int, CcomSendBuffer, (int portnr, const char *buffer, int n, CCOM_METHOD(void, Notify, (int portnr, void *data)), void *data)); ! CCOM_FUNC(int, CcomStartScanning, (int portnr, int options, CCOM_METHOD(void, CallBack, (int portnr, int readdata, int error, void *data)), void *data)); ! CCOM_FUNC(void, CcomSetPath, (const char *path)); ! ! CCOM_FUNC(int, CcomStopSending, (int portno)); ! CCOM_FUNC(int, CcomStopScanning, (int portno)); ! ! CCOM_FUNC(int, CcomSetBaud, (int portno, long baud_rate)); ! CCOM_FUNC(int, CcomSetBits, (int portno, int nobits)); ! CCOM_FUNC(int, CcomSetStopBits, (int portno, int stopbits)); ! CCOM_FUNC(int, CcomSetParity, (int portno, int parity)); ! CCOM_FUNC(int, CcomSetParityEnable, (int portno, int parityenable)); ! CCOM_FUNC(void, CcomLoopBackMode, (int portno, int mode)); ! ! #endif |
From: Rasmus M. <ras...@us...> - 2004-11-08 21:16:47
|
Update of /cvsroot/ccomx/ccom/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1343 Modified Files: ccom._tx readme._tx Log Message: Line endings Index: readme._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/readme._tx,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** readme._tx 21 Jun 2004 19:17:54 -0000 1.5 --- readme._tx 8 Nov 2004 21:16:37 -0000 1.6 *************** *** 1,216 **** ! @# This is the source for the CCOM readme file, in Allegro's custom format. ! @# Read allegro/docs/makedoc.c for a description of what is going on... ! @# ! @#ignore_css ! @multiwordheaders ! @document_title=CCOM readme ! @rtfh=Readme file of CCOM ! @$\input texinfo ! @$@setfilename readme.inf ! @$@settitle Readme of CCOM ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$@setchapternewpage off ! @# This should remain commented at the moment (dvi output) @$@finalout ! @$ ! @$@ifinfo ! @$@direntry ! @$* Readme: (readme). Readme in CCOM ! @$@end direntry ! @$This is the Info version of the CCOM readme file. ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>Readme file of CCOM</title> ! @<body> ! <center><b>A CGUI and Allegro addon for serial port communication</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! Readme file of CCOM ! </b></center> ! @!text ! @heading ! Contents ! ! @shortcontents ! ! @text ! @heading ! Introduction ! ! CCOM is a library with functions for sending and receiving data via the ! serial ports, using the event queue of CGUI. It also provides a dialogue ! that lets the user modify the port settings. ! ! CCOM builds and operates on the following platforms: DOS/DJGPP, Linux, ! Windows/Mingw32 and Windows/MSVC. ! ! @heading ! Requirements ! ! You need to have compiled and installed Allegro version 4.0.x, as well as ! CGUI vesion 1.6.7 or later. ! There are also other requirements like correctly installed compilers etc. ! but these are already fulfilled if you succeded in making and installing ! Allegro and CGUI (no additional requirements are needed). ! ! You can find Allegro at: ! http://alleg.sourceforge.net/ ! ! You can find CGUI at: ! http://www.mdh.se/~csg/cgui/ ! ! ! @heading ! Installation ! ! Installation goes in some simple steps, and should be familiar since it is ! similar to the installation procedure as of Allegro and CGUI: ! <ul> ! <li> ! Tell the installation process what platform you use. Start a command window ! (shell) and set the main directory of CCOM to you current directory ! i.e. enter the command ! <pre> ! cd c:\cbar ! </pre> ! or whatever is the name of your ccom directory. Then choose platform by ! running one of the following commands: ! <pre> ! fix.bat djgpp - to compile with DOS/DJGPP ! fix.bat mingw32 - to compile with Windows/MinGW32 ! fix.bat msvc - to compile with Windows/MSVC ! ./fix.sh unix - to compile with Linux/gcc ! </pre> ! <li> ! Specify the path to your allegro installation by setting the environment ! variable ALLEGRO. E.g. if your allegro directory is c:\allegro then ! you must type <br> ! <pre> ! set ALLEGRO=c:\allegro ! </pre> ! or alternatively put that line into your autoexec file and restart. ! For unix users: ! <pre> ! export ALLEGRO=/home/user/allegro-4.0.3 ! </pre> ! or whatever is the name of your allegro directory. ! <li> ! Specify the path to your CGUI installation by setting the environment ! CGUIDIR the same way as ALLEGRO, e.g.<br> ! <pre> ! set CGUIDIR=c:\cgui ! </pre> ! <pre> ! export CGUIDIR=/home/user/cgui ! </pre> ! <li> ! Ensure that all CGUI's tools has been built: ! Make CGUI's directory to the current, e.g. type the command ! <pre> ! cd c:\cgui ! </pre> ! Build: ! <pre> ! make dat2c ! make mktext ! </pre> ! Return to the main directory of cbar, e.g.: ! <pre> ! cd c:\ccom ! </pre> ! <li> ! Compile the library. This is done by running "make" at the command line. ! <li> ! Install the files to common directories. This is done by running ! "make install" at the command line.<br> ! Under Linux, you may want to instead run "make install SYSTEM_DIR=<dir>", ! which will cause headers to be installed to <dir>/include and libraries to ! <dir>/lib. (default for <dir> is /usr/local), or else you need to ! run make install as root. ! </ul> ! That's it! Now you are ready to run the example program in the example directory. ! <p> ! You may also want to perform some of the optional steps during the installation: ! <ul> ! <li> ! You can compile a debugging library by typing "make DEBUGMODE=1" instead of ! just "make" and "make install DEBUGMODE=1" instead of "make install". ! To compile both the usual and the debug library in one step, ! type "make all" and "make installall".<br> ! These debugging libraries require that you also have maked and installed ! the debugging versions of Allegro and CGUI. ! <li> ! If you want statically linked libraries under Unix or Windows as well as ! the default dynamically linked libraries (dll under Windows, .so under ! Unix), add "STATICLINK=1" to the make command like "make STATICLINK=1", ! or "make DEBUGMODE=1 STATICLINK=1" and also add it to the installation ! command.<br> ! These static libraries require that you also have maked and installed ! the static versions of Allegro and CGUI. ! <li> ! Users of the MSys environment needs to set teh environment vaariable ! UNIX_TOOLS to 1 before make install is run. ! <li> ! If you want to read the CCOM documentation with the Rhide online help ! system, go to the "Help / Syntax help / Files to search" menu in Rhide, ! and add "ccom" after the existing "libc" entry (separated by a space). ! <li> ! To use the ! To use the debugging library, link with libccomd.a instead of libccom.a. ! </ul> ! ! ! @heading ! Usage ! <ul><li> ! #include <ccom.h> in the top of each file that uses a function from ! the library. ! <li> ! Before calling any CCOM functions you must have initialized CGUI, Note! ! CGUI! For info about available functions, please read the manual, e.g. ! ccom.html (but the docs are also available in other formats). ! <li> ! If you link on the command line, link with '-lccom -lcgui -lalleg'. It is ! important that you specify the libraries in that order. If you want the ! ability to debug inside CCOM's functions, then link with '-lccomd' ! instead of '-lccom'. ! <p> ! On Linux you can use the following command to link with the default ! lib of CCOM (please note the ` ) ! <pre> ! gcc -s -lccom -lcgui `allegro-config --libs release --shared` file.o ! </pre> ! where `file' is the name of your file. <br> ! For debug libraries use -lccomd -lcguid instead and replace release ! with debug in the allegro config option. For linking a static application ! use -lccom_s and -lcgui_s and replace --shared with --static. ! <li> ! If you use the RHIDE environment, go to the menu Options/Libraries and ! fill in ccom. It is important that ccom is above cgui and allegro. Don't ! forget to check the box to the left of the library. You have to replace ! ccom with ccomd to include debugging information. ! <li> ! If you use some other environment, there is probably some options dialog ! where you can enter the libraries names (e.g. -lccom -lcgui -lalleg). ! </ul> ! ! ! @heading ! Contact Info ! ! Email:<ul> ! chr...@md... ! </ul> ! Homepage:<ul> ! http://www.idt.mdh.se/~csg/cgui/cguix ! </ul> ! Telephone:<ul> ! +46.(0)21.38.10.66 ! </ul> --- 1,216 ---- ! @# This is the source for the CCOM readme file, in Allegro's custom format. ! @# Read allegro/docs/makedoc.c for a description of what is going on... ! @# ! @#ignore_css ! @multiwordheaders ! @document_title=CCOM readme ! @rtfh=Readme file of CCOM ! @$\input texinfo ! @$@setfilename readme.inf ! @$@settitle Readme of CCOM ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$@setchapternewpage off ! @# This should remain commented at the moment (dvi output) @$@finalout ! @$ ! @$@ifinfo ! @$@direntry ! @$* Readme: (readme). Readme in CCOM ! @$@end direntry ! @$This is the Info version of the CCOM readme file. ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>Readme file of CCOM</title> ! @<body> ! <center><b>A CGUI and Allegro addon for serial port communication</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! Readme file of CCOM ! </b></center> ! @!text ! @heading ! Contents ! ! @shortcontents ! ! @text ! @heading ! Introduction ! ! CCOM is a library with functions for sending and receiving data via the ! serial ports, using the event queue of CGUI. It also provides a dialogue ! that lets the user modify the port settings. ! ! CCOM builds and operates on the following platforms: DOS/DJGPP, Linux, ! Windows/Mingw32 and Windows/MSVC. ! ! @heading ! Requirements ! ! You need to have compiled and installed Allegro version 4.0.x, as well as ! CGUI vesion 1.6.7 or later. ! There are also other requirements like correctly installed compilers etc. ! but these are already fulfilled if you succeded in making and installing ! Allegro and CGUI (no additional requirements are needed). ! ! You can find Allegro at: ! http://alleg.sourceforge.net/ ! ! You can find CGUI at: ! http://www.mdh.se/~csg/cgui/ ! ! ! @heading ! Installation ! ! Installation goes in some simple steps, and should be familiar since it is ! similar to the installation procedure as of Allegro and CGUI: ! <ul> ! <li> ! Tell the installation process what platform you use. Start a command window ! (shell) and set the main directory of CCOM to you current directory ! i.e. enter the command ! <pre> ! cd c:\cbar ! </pre> ! or whatever is the name of your ccom directory. Then choose platform by ! running one of the following commands: ! <pre> ! fix.bat djgpp - to compile with DOS/DJGPP ! fix.bat mingw32 - to compile with Windows/MinGW32 ! fix.bat msvc - to compile with Windows/MSVC ! ./fix.sh unix - to compile with Linux/gcc ! </pre> ! <li> ! Specify the path to your allegro installation by setting the environment ! variable ALLEGRO. E.g. if your allegro directory is c:\allegro then ! you must type <br> ! <pre> ! set ALLEGRO=c:\allegro ! </pre> ! or alternatively put that line into your autoexec file and restart. ! For unix users: ! <pre> ! export ALLEGRO=/home/user/allegro-4.0.3 ! </pre> ! or whatever is the name of your allegro directory. ! <li> ! Specify the path to your CGUI installation by setting the environment ! CGUIDIR the same way as ALLEGRO, e.g.<br> ! <pre> ! set CGUIDIR=c:\cgui ! </pre> ! <pre> ! export CGUIDIR=/home/user/cgui ! </pre> ! <li> ! Ensure that all CGUI's tools has been built: ! Make CGUI's directory to the current, e.g. type the command ! <pre> ! cd c:\cgui ! </pre> ! Build: ! <pre> ! make dat2c ! make mktext ! </pre> ! Return to the main directory of cbar, e.g.: ! <pre> ! cd c:\ccom ! </pre> ! <li> ! Compile the library. This is done by running "make" at the command line. ! <li> ! Install the files to common directories. This is done by running ! "make install" at the command line.<br> ! Under Linux, you may want to instead run "make install SYSTEM_DIR=<dir>", ! which will cause headers to be installed to <dir>/include and libraries to ! <dir>/lib. (default for <dir> is /usr/local), or else you need to ! run make install as root. ! </ul> ! That's it! Now you are ready to run the example program in the example directory. ! <p> ! You may also want to perform some of the optional steps during the installation: ! <ul> ! <li> ! You can compile a debugging library by typing "make DEBUGMODE=1" instead of ! just "make" and "make install DEBUGMODE=1" instead of "make install". ! To compile both the usual and the debug library in one step, ! type "make all" and "make installall".<br> ! These debugging libraries require that you also have maked and installed ! the debugging versions of Allegro and CGUI. ! <li> ! If you want statically linked libraries under Unix or Windows as well as ! the default dynamically linked libraries (dll under Windows, .so under ! Unix), add "STATICLINK=1" to the make command like "make STATICLINK=1", ! or "make DEBUGMODE=1 STATICLINK=1" and also add it to the installation ! command.<br> ! These static libraries require that you also have maked and installed ! the static versions of Allegro and CGUI. ! <li> ! Users of the MSys environment needs to set teh environment vaariable ! UNIX_TOOLS to 1 before make install is run. ! <li> ! If you want to read the CCOM documentation with the Rhide online help ! system, go to the "Help / Syntax help / Files to search" menu in Rhide, ! and add "ccom" after the existing "libc" entry (separated by a space). ! <li> ! To use the ! To use the debugging library, link with libccomd.a instead of libccom.a. ! </ul> ! ! ! @heading ! Usage ! <ul><li> ! #include <ccom.h> in the top of each file that uses a function from ! the library. ! <li> ! Before calling any CCOM functions you must have initialized CGUI, Note! ! CGUI! For info about available functions, please read the manual, e.g. ! ccom.html (but the docs are also available in other formats). ! <li> ! If you link on the command line, link with '-lccom -lcgui -lalleg'. It is ! important that you specify the libraries in that order. If you want the ! ability to debug inside CCOM's functions, then link with '-lccomd' ! instead of '-lccom'. ! <p> ! On Linux you can use the following command to link with the default ! lib of CCOM (please note the ` ) ! <pre> ! gcc -s -lccom -lcgui `allegro-config --libs release --shared` file.o ! </pre> ! where `file' is the name of your file. <br> ! For debug libraries use -lccomd -lcguid instead and replace release ! with debug in the allegro config option. For linking a static application ! use -lccom_s and -lcgui_s and replace --shared with --static. ! <li> ! If you use the RHIDE environment, go to the menu Options/Libraries and ! fill in ccom. It is important that ccom is above cgui and allegro. Don't ! forget to check the box to the left of the library. You have to replace ! ccom with ccomd to include debugging information. ! <li> ! If you use some other environment, there is probably some options dialog ! where you can enter the libraries names (e.g. -lccom -lcgui -lalleg). ! </ul> ! ! ! @heading ! Contact Info ! ! Email:<ul> ! chr...@md... ! </ul> ! Homepage:<ul> ! http://www.idt.mdh.se/~csg/cgui/cguix ! </ul> ! Telephone:<ul> ! +46.(0)21.38.10.66 ! </ul> Index: ccom._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/ccom._tx,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ccom._tx 21 Jun 2004 19:17:54 -0000 1.6 --- ccom._tx 8 Nov 2004 21:16:37 -0000 1.7 *************** *** 1,238 **** ! @#This is the source for the CCOM manual, in Shawn's special format. ! @#The readable documents are generated and will be found in the files: ! @#ccom.txt,ccom.rtf, ccom.htm, ccom.inf, the latter may be ! @#installed as on-line help if you are using rhide (just add cbarcode to the ! @#list of help files) ! @# ! @multiwordheaders ! @manh="version 0.9.2" "CCOM" "Manual" ! @document_title=CCOM Manual ! @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports ! @$\input texinfo ! @$@setfilename ccom.inf ! @$@settitle CCOM Manual ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$ ! @$@ifinfo ! @$This is the Info version of the CCOM manual ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>The CCOM API</title> ! @<body> ! <center><b>CCOM</b></center> ! <center><b>A CGUI and Allegro addon Communication package</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! The Manual of CCOM 0.9.2 ! </b></center> ! @!text ! ! @heading ! Contents ! ! @contents ! ! @text ! @heading ! Using CCOM ! @xref Simple use of COM ports ! @xref Direct_port_setting ! To be able to call the functions in the CCOM lib you must first build and ! install the lib and then #include <ccom.h> in your C file(s). You must ! also link to the lib libcgui.a (or use the dynamic linked module). When ! you run your program you must also ensure that the text labels for the ! dialogue rea present (don't forget this when you distribute your program ! to other people!). You can find that file in the examples directory of ! CCOM. ! ! @heading ! Simple use of COM ports ! @xref Direct_port_setting ! A "serial port" is a chip in the computer with two sides, one "speaking" to ! the CPU (i.e. your program), the other sending data to and receiving data ! from some device connected to the plug at the back of the computer. ! The transmission of data on the line can be done in different manners, ! the sender and receiver must always agree on which manner. The current ! hardware is not able to do anything like "auto-detection". Therefore ! the port must be informed how to transmit data to and from the ! currently connected device. These "port settings" must be set from the "CPU ! side" of the port, i.e. your program must do it. Only the end user of your ! program knows what device that is connected to his or her computer for the ! moment. Therefore the task is quite simple for you: Provide the end-user ! with some kind of dialogue to enter the port settings. When the settings has ! been chosen the port must be informed about these settings. <br> ! The major tasks for CCOM are: ! <ul> ! <li> provide such a dialogue ! <li> hide details about how to tell the port about these settings ! <li> hide details about how to send and receive data ! </ul> ! To send data you just call the send-function. To be able to receive data ! you need to call another function to "register" a call-back (a pointer to ! some function that you have written) that will be called as soon as some ! data has reached the port from the outside world.<br> ! ! @@int @CcomSettingsDialogue(int portnr); ! Starts a dialogue which let the user modify the port settings. If the ! user confirms the changes made (by closing the dialogue with ! "OK"), the new settings will immediately be applied to the hardware and ! also stored into the config-file. <br> ! Parameter: ! <ul> ! <li> portnr: the port number (CCOM_COM1, CCOM_COM2, CCOM_COM3, CCOM_COM4) to ! modify settings for. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomSendBuffer(int portnr, const char *buffer, int n, void (*Notify) (int portnr, void *data), void *data); ! Starts the sending of the buffer `buffer' to port `portnr'. ! If the previous buffer(s) has not yet been sent, `CcomSendBuffer' will ! enque the new buffer. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file.<br> ! <ul> ! <li> portnr: The port number (CCOM_COM*) to send the buffer to ! <li> buffer: The data to send. A copy of `buffer' will be made so ! you are free to destroy your calling buffer. ! <li> n: The number of bytes to send. ! <li> Notify: (optional) A pointer to a function of yours, that will ! be called when the buffer has been successfully sent. If you don't ! need any notification, just pass NULL.<br> ! `Notify' is associated with the current buffer only so, if you want, ! you may alter both the call-back and data-pointer between different ! buffers. ! Parameters to `Notify': ! <ul> ! <li> portnr: The port that the data was sent on. ! <li> data: The pointer `data' passed to `CcomSendBuffer'. ! </ul> ! <li> data: A pointer to some data that will be passed to `Notify', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStartScanning(int portnr, int options, void (*CallBack) (int portnr, int readdata, int error, void *data), void *data); ! Starts to check the port `portno' for bytes. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file. ! <ul> ! <li> portnr: The port number (CCOM_COM*) to receive bytes from. ! <li> CallBack: A pointer to a function of yours that will ! be called as soon as a byte has been received. <br> ! Parameters to `CallBack': ! <ul> ! <li> portnr: The port where the data was received ! <li> options: Currently not used. ! <li> readdata: The the low-order byte of `readdata' contains ! the byte read from the port. ! <li> error: If a transmission error was detected, then this ! error code will be passed in `error'. The possible errors are: ! <ul> ! <li> CCOM_ERR_ORUN - Overrun, may occure if polling is used and ! the progam is not fast enough to check the port. ! <li> CCOM_ERR_PAR - Parity error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! <li> CCOM_ERR_FRAME - Frame error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! </ul> ! <li> data: The pointer `data' passed to `CcomStartScanning'. ! </ul> ! <li> data: A pointer to some data that will be passed to `CallBack', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStopSending(int portno) ! Normally you don't need to use this function. `CcomStopSending' will stop ! the sending. Buffers that are unsent (partially or completetly) ! will be dropped. ! Returns 1 if successful else 0. ! ! @@int @CcomStopScanning(int portno); ! Normally you don't need to use this function. `CcomStopScanning' will stop ! scanning (checking the port for incoming data). ! Returns 1 if successful else 0. ! ! @@void @CcomSetPath(const char *path); ! It's not necessary to use this function. The dialogue will look for the ! file with textlabels in the current directory (i.e. it will try to open ! "ccomlabl.txt"). I you prefere locating that file somewhere else you can ! can use `CcomSetPath' to specify that path. The path must include also the ! file name. The path may lead to somewhere in a datafile if you use the ! '#' delimiter after the data-file name (as usual). ! In the distribution of CCOM the text-file is located in the examples ! directory. It can be re-built by use of the `mktext' tool of CGUI (see ! the tools directory of CGUI for details about the tool). Enter the ! command `make texts CGUIDIR=<path>' where <path> is the path to your ! CGUI directory. To add labels of your favorite language to the label file ! do these additions into file src/*.t and re-build. If you do it, it would ! also be fine if you send me the changes so I can add them to next release! ! ! @heading ! Direct_port_setting ! @xref Simple use of COM ports ! If you for some reason don't like the dialogue for port settings, you can ! make your own and instead use the direct port setting functions.<br> ! In some cases you may want to do a program for computer-computer ! communication, then it may in some cases be meaningful to hard-code the ! port settings, in which case the direct port setting functions can be used. ! In most cases it will however not be meaningful to hard-code the settings of ! the port. ! ! @@int @CcomSetBaud(int portno, long baud_rate); ! Normally you dont need to call this function. ! Modifies the port setting concerning the transmission speed. If you call ! this function you must call it after the first call to `CcomStartScanning' ! or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetBits(int portno, int nrbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning number of bits in each byte. `nrbits' ! can range from 5 to 8. If you use this function you must call it after ! the first call to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetStopBits(int portno, int stopbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning stopbits. `stopbits' can be either 1 ! or 2. If you use this function you must call it after the first call ! to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParity(int portno, int parity); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity. If `parity' is ! 1 the parity check will be "even", if 0 odd. If you use this function ! you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParityEnable(int portno, int parityenable); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity enable. If `parityenable' is ! 1 the parity check will be enabled, if 0 disabled. If you use this ! function you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @headingnocontent ! Index ! ! @index ! ! @$@contents ! @$@bye ! ! @html ! @text --- 1,238 ---- ! @#This is the source for the CCOM manual, in Shawn's special format. ! @#The readable documents are generated and will be found in the files: ! @#ccom.txt,ccom.rtf, ccom.htm, ccom.inf, the latter may be ! @#installed as on-line help if you are using rhide (just add cbarcode to the ! @#list of help files) ! @# ! @multiwordheaders ! @manh="version 0.9.2" "CCOM" "Manual" ! @document_title=CCOM Manual ! @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports ! @$\input texinfo ! @$@setfilename ccom.inf ! @$@settitle CCOM Manual ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$ ! @$@ifinfo ! @$This is the Info version of the CCOM manual ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>The CCOM API</title> ! @<body> ! <center><b>CCOM</b></center> ! <center><b>A CGUI and Allegro addon Communication package</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! The Manual of CCOM 0.9.2 ! </b></center> ! @!text ! ! @heading ! Contents ! ! @contents ! ! @text ! @heading ! Using CCOM ! @xref Simple use of COM ports ! @xref Direct_port_setting ! To be able to call the functions in the CCOM lib you must first build and ! install the lib and then #include <ccom.h> in your C file(s). You must ! also link to the lib libcgui.a (or use the dynamic linked module). When ! you run your program you must also ensure that the text labels for the ! dialogue rea present (don't forget this when you distribute your program ! to other people!). You can find that file in the examples directory of ! CCOM. ! ! @heading ! Simple use of COM ports ! @xref Direct_port_setting ! A "serial port" is a chip in the computer with two sides, one "speaking" to ! the CPU (i.e. your program), the other sending data to and receiving data ! from some device connected to the plug at the back of the computer. ! The transmission of data on the line can be done in different manners, ! the sender and receiver must always agree on which manner. The current ! hardware is not able to do anything like "auto-detection". Therefore ! the port must be informed how to transmit data to and from the ! currently connected device. These "port settings" must be set from the "CPU ! side" of the port, i.e. your program must do it. Only the end user of your ! program knows what device that is connected to his or her computer for the ! moment. Therefore the task is quite simple for you: Provide the end-user ! with some kind of dialogue to enter the port settings. When the settings has ! been chosen the port must be informed about these settings. <br> ! The major tasks for CCOM are: ! <ul> ! <li> provide such a dialogue ! <li> hide details about how to tell the port about these settings ! <li> hide details about how to send and receive data ! </ul> ! To send data you just call the send-function. To be able to receive data ! you need to call another function to "register" a call-back (a pointer to ! some function that you have written) that will be called as soon as some ! data has reached the port from the outside world.<br> ! ! @@int @CcomSettingsDialogue(int portnr); ! Starts a dialogue which let the user modify the port settings. If the ! user confirms the changes made (by closing the dialogue with ! "OK"), the new settings will immediately be applied to the hardware and ! also stored into the config-file. <br> ! Parameter: ! <ul> ! <li> portnr: the port number (CCOM_COM1, CCOM_COM2, CCOM_COM3, CCOM_COM4) to ! modify settings for. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomSendBuffer(int portnr, const char *buffer, int n, void (*Notify) (int portnr, void *data), void *data); ! Starts the sending of the buffer `buffer' to port `portnr'. ! If the previous buffer(s) has not yet been sent, `CcomSendBuffer' will ! enque the new buffer. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file.<br> ! <ul> ! <li> portnr: The port number (CCOM_COM*) to send the buffer to ! <li> buffer: The data to send. A copy of `buffer' will be made so ! you are free to destroy your calling buffer. ! <li> n: The number of bytes to send. ! <li> Notify: (optional) A pointer to a function of yours, that will ! be called when the buffer has been successfully sent. If you don't ! need any notification, just pass NULL.<br> ! `Notify' is associated with the current buffer only so, if you want, ! you may alter both the call-back and data-pointer between different ! buffers. ! Parameters to `Notify': ! <ul> ! <li> portnr: The port that the data was sent on. ! <li> data: The pointer `data' passed to `CcomSendBuffer'. ! </ul> ! <li> data: A pointer to some data that will be passed to `Notify', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStartScanning(int portnr, int options, void (*CallBack) (int portnr, int readdata, int error, void *data), void *data); ! Starts to check the port `portno' for bytes. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file. ! <ul> ! <li> portnr: The port number (CCOM_COM*) to receive bytes from. ! <li> CallBack: A pointer to a function of yours that will ! be called as soon as a byte has been received. <br> ! Parameters to `CallBack': ! <ul> ! <li> portnr: The port where the data was received ! <li> options: Currently not used. ! <li> readdata: The the low-order byte of `readdata' contains ! the byte read from the port. ! <li> error: If a transmission error was detected, then this ! error code will be passed in `error'. The possible errors are: ! <ul> ! <li> CCOM_ERR_ORUN - Overrun, may occure if polling is used and ! the progam is not fast enough to check the port. ! <li> CCOM_ERR_PAR - Parity error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! <li> CCOM_ERR_FRAME - Frame error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! </ul> ! <li> data: The pointer `data' passed to `CcomStartScanning'. ! </ul> ! <li> data: A pointer to some data that will be passed to `CallBack', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStopSending(int portno) ! Normally you don't need to use this function. `CcomStopSending' will stop ! the sending. Buffers that are unsent (partially or completetly) ! will be dropped. ! Returns 1 if successful else 0. ! ! @@int @CcomStopScanning(int portno); ! Normally you don't need to use this function. `CcomStopScanning' will stop ! scanning (checking the port for incoming data). ! Returns 1 if successful else 0. ! ! @@void @CcomSetPath(const char *path); ! It's not necessary to use this function. The dialogue will look for the ! file with textlabels in the current directory (i.e. it will try to open ! "ccomlabl.txt"). I you prefere locating that file somewhere else you can ! can use `CcomSetPath' to specify that path. The path must include also the ! file name. The path may lead to somewhere in a datafile if you use the ! '#' delimiter after the data-file name (as usual). ! In the distribution of CCOM the text-file is located in the examples ! directory. It can be re-built by use of the `mktext' tool of CGUI (see ! the tools directory of CGUI for details about the tool). Enter the ! command `make texts CGUIDIR=<path>' where <path> is the path to your ! CGUI directory. To add labels of your favorite language to the label file ! do these additions into file src/*.t and re-build. If you do it, it would ! also be fine if you send me the changes so I can add them to next release! ! ! @heading ! Direct_port_setting ! @xref Simple use of COM ports ! If you for some reason don't like the dialogue for port settings, you can ! make your own and instead use the direct port setting functions.<br> ! In some cases you may want to do a program for computer-computer ! communication, then it may in some cases be meaningful to hard-code the ! port settings, in which case the direct port setting functions can be used. ! In most cases it will however not be meaningful to hard-code the settings of ! the port. ! ! @@int @CcomSetBaud(int portno, long baud_rate); ! Normally you dont need to call this function. ! Modifies the port setting concerning the transmission speed. If you call ! this function you must call it after the first call to `CcomStartScanning' ! or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetBits(int portno, int nrbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning number of bits in each byte. `nrbits' ! can range from 5 to 8. If you use this function you must call it after ! the first call to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetStopBits(int portno, int stopbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning stopbits. `stopbits' can be either 1 ! or 2. If you use this function you must call it after the first call ! to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParity(int portno, int parity); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity. If `parity' is ! 1 the parity check will be "even", if 0 odd. If you use this function ! you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParityEnable(int portno, int parityenable); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity enable. If `parityenable' is ! 1 the parity check will be enabled, if 0 disabled. If you use this ! function you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @headingnocontent ! Index ! ! @index ! ! @$@contents ! @$@bye ! ! @html ! @text |
From: Rasmus M. <ras...@us...> - 2004-11-08 21:15:32
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv956 Modified Files: makefile.all makefile.bcc makefile.dj makefile.mgw makefile.uni makefile.vc makefile.ver Log Message: Line endings Index: makefile.uni =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.uni,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makefile.uni 21 Jun 2004 19:17:54 -0000 1.4 --- makefile.uni 8 Nov 2004 21:15:21 -0000 1.5 *************** *** 1,226 **** ! # makefile.uni: ! # Makefile for the CCOM library with Unix. Should not be used directly! ! # ! # By Christer Sandberg (copied from ADIME made by Sven Sandberg) ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = UNIX ! ! EXE_SUFFIX = ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/unix ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/unix ! ! HAVE_TEXINFO = 1 ! ! ifdef STATICLINK # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! IMPLIB_BASENAME = lib$(PACKAGE)_s.a ! else # link as a shared object ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! IMPLIB_BASENAME = lib$(PACKAGE).so ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Default system paths. ------------ ! ! ifndef SYSTEM_DIR ! SYSTEM_DIR = /usr/local ! endif ! SYSTEM_INCLUDE_DIR = $(SYSTEM_DIR)/include ! SYSTEM_LIB_DIR = $(SYSTEM_DIR)/lib ! ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(ALLEGRO_DAT_X) ! CGUI_DAT2C = $(CGUI_DAT2C_X) ! CCOM_DAT = $(CCOM_DAT_X) ! CCOM_DAT_C = $(CCOM_DAT_C_X) ! CCOM_DAT_H = $(CCOM_DAT_H_X) ! CCOM_LABELS = $(CCOM_LABELS_X) ! TEXT_SOURCES = $(TEXT_SOURCES_X) ! TEXT_HEADERS = $(TEXT_HEADERS_X) ! MKTEXT = $(MKTEXT_X) ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef STATICLINK ! ALLEGRO_CONFIG_FLAGS = --static ! LIB_FLAGS = -lcgui_s ! else ! ALLEGRO_CONFIG_FLAGS = --shared ! LIB_FLAGS = -lcgui ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS += -g ! LIB_FLAGS += `allegro-config --libs debug $(ALLEGRO_CONFIG_FLAGS)` ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS += -pg ! LIB_FLAGS += `allegro-config --libs profile $(ALLEGRO_CONFIG_FLAGS)` ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS += -s ! LIB_FLAGS += `allegro-config --libs release $(ALLEGRO_CONFIG_FLAGS)` ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! ifdef PROFILEMODE ! LIB_FLAGS += -lgmon ! endif ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2UNIX = -D__UNIX__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS) ! endef ! else ! # link as a shared object ! define LINK_OBJ_TO_LIB ! gcc $(LFLAGS) -shared -o $(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< -L$(LIB_DIR) -lccom $(LIB_FLAGS) ! endef ! endif ! ! # -------- Rules for installing and removing the library files. -------- ! ! # If you don't have the install command, you may use cp and mkdir, but ! # this will not set permissions. ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! install -m 755 -d $(SYSTEM_LIB_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! install -m 755 -d $(SYSTEM_INCLUDE_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! install -m 755 -d $(SYSTEM_INCLUDE_DIR)/ccom ! install -m 644 $< $@ ! ! ! INSTALL_HEADERS = $(addprefix $(SYSTEM_DIR)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(INSTALL_HEADERS) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) UNIX library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom_s.a $(SYSTEM_LIB_DIR)/libccomd_s.a \ ! $(SYSTEM_LIB_DIR)/libccom.so $(SYSTEM_LIB_DIR)/libccomd.so \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- generate automatic dependencies -------- ! ! DEPEND_PARAMS = $(GCC2UNIX) -MM -MG -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom\/\1\.o:/" _depend.tmp > obj/unix/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd\/\1\.o:/" _depend.tmp > obj/unix/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom_s\/\1\.o:/" _depend.tmp > obj/unix/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd_s\/\1\.o:/" _depend.tmp > obj/unix/ccomd_s/makefile.dep ! rm _depend.tmp --- 1,226 ---- ! # makefile.uni: ! # Makefile for the CCOM library with Unix. Should not be used directly! ! # ! # By Christer Sandberg (copied from ADIME made by Sven Sandberg) ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = UNIX ! ! EXE_SUFFIX = ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/unix ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/unix ! ! HAVE_TEXINFO = 1 ! ! ifdef STATICLINK # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! IMPLIB_BASENAME = lib$(PACKAGE)_s.a ! else # link as a shared object ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! IMPLIB_BASENAME = lib$(PACKAGE).so ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Default system paths. ------------ ! ! ifndef SYSTEM_DIR ! SYSTEM_DIR = /usr/local ! endif ! SYSTEM_INCLUDE_DIR = $(SYSTEM_DIR)/include ! SYSTEM_LIB_DIR = $(SYSTEM_DIR)/lib ! ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(ALLEGRO_DAT_X) ! CGUI_DAT2C = $(CGUI_DAT2C_X) ! CCOM_DAT = $(CCOM_DAT_X) ! CCOM_DAT_C = $(CCOM_DAT_C_X) ! CCOM_DAT_H = $(CCOM_DAT_H_X) ! CCOM_LABELS = $(CCOM_LABELS_X) ! TEXT_SOURCES = $(TEXT_SOURCES_X) ! TEXT_HEADERS = $(TEXT_HEADERS_X) ! MKTEXT = $(MKTEXT_X) ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef STATICLINK ! ALLEGRO_CONFIG_FLAGS = --static ! LIB_FLAGS = -lcgui_s ! else ! ALLEGRO_CONFIG_FLAGS = --shared ! LIB_FLAGS = -lcgui ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS += -g ! LIB_FLAGS += `allegro-config --libs debug $(ALLEGRO_CONFIG_FLAGS)` ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS += -pg ! LIB_FLAGS += `allegro-config --libs profile $(ALLEGRO_CONFIG_FLAGS)` ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS += -s ! LIB_FLAGS += `allegro-config --libs release $(ALLEGRO_CONFIG_FLAGS)` ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! ifdef PROFILEMODE ! LIB_FLAGS += -lgmon ! endif ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2UNIX = -D__UNIX__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS) ! endef ! else ! # link as a shared object ! define LINK_OBJ_TO_LIB ! gcc $(LFLAGS) -shared -o $(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< -L$(LIB_DIR) -lccom $(LIB_FLAGS) ! endef ! endif ! ! # -------- Rules for installing and removing the library files. -------- ! ! # If you don't have the install command, you may use cp and mkdir, but ! # this will not set permissions. ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! install -m 755 -d $(SYSTEM_LIB_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! install -m 755 -d $(SYSTEM_INCLUDE_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! install -m 755 -d $(SYSTEM_INCLUDE_DIR)/ccom ! install -m 644 $< $@ ! ! ! INSTALL_HEADERS = $(addprefix $(SYSTEM_DIR)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(INSTALL_HEADERS) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) UNIX library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom_s.a $(SYSTEM_LIB_DIR)/libccomd_s.a \ ! $(SYSTEM_LIB_DIR)/libccom.so $(SYSTEM_LIB_DIR)/libccomd.so \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- generate automatic dependencies -------- ! ! DEPEND_PARAMS = $(GCC2UNIX) -MM -MG -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom\/\1\.o:/" _depend.tmp > obj/unix/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd\/\1\.o:/" _depend.tmp > obj/unix/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom_s\/\1\.o:/" _depend.tmp > obj/unix/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd_s\/\1\.o:/" _depend.tmp > obj/unix/ccomd_s/makefile.dep ! rm _depend.tmp Index: makefile.ver =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.ver,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** makefile.ver 21 Jun 2004 19:17:54 -0000 1.6 --- makefile.ver 8 Nov 2004 21:15:21 -0000 1.7 *************** *** 1,10 **** ! # version numbers included by the main makefile ! # this file is patched by fixver.sh ! ! # DLL filename number for Windows ! LIB_VERSION = 09 ! ! # Shared library versions for Unix ! # todo: this is unused at the moment ! shared_version = 0.9.2 ! shared_major_minor = 0.9 --- 1,10 ---- ! # version numbers included by the main makefile ! # this file is patched by fixver.sh ! ! # DLL filename number for Windows ! LIB_VERSION = 09 ! ! # Shared library versions for Unix ! # todo: this is unused at the moment ! shared_version = 0.9.2 ! shared_major_minor = 0.9 Index: makefile.bcc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.bcc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makefile.bcc 21 Jun 2004 19:17:54 -0000 1.5 --- makefile.bcc 8 Nov 2004 21:15:21 -0000 1.6 *************** *** 1,334 **** ! # makefile.bcc: ! # Makefile for the CCOM library with Borland C++Builder. ! # Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # You need to set BCC32DIR to the directory where Borland C++Builder is ! # located. ! # ! # This build uses djgpp for calculating source dependencies. ! # The "depend" target uses sed. ! ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = BCC32 ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/bcc32 ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\bcc32 ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/bcc32 ! LIB_DIR_D = $(LIB_ROOT_DIR)\bcc32 ! ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! IMPDEF_NAME = $(LIB_DIR)/impccom.def ! endif ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badbcc32 ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(windir) ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef BCC32DIR ! BCC32DIR_U = $(subst \,/,$(BCC32DIR)) ! BCC32DIR_D = $(subst /,\,$(BCC32DIR)) ! else ! badbcc32: ! @echo You need to set BCC32DIR to the directory where Borland C++Builder is ! @echo located. ! endif ! ! ! SYSTEM_INCLUDE_DIR = $(BCC32DIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(BCC32DIR_D)\include ! SYSTEM_LIB_DIR = $(BCC32DIR_U)/lib ! SYSTEM_LIB_DIR_D = $(BCC32DIR_D)\lib ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! # -------- give a sensible default target for make without any args -------- ! ! .PHONY: _default ! ! _default: default ! ! # -------- decide what compiler options to use -------- ! ! ifdef WARNMODE ! WFLAGS = -w ! else ! WFLAGS = ! endif ! ! ifdef DEBUGMODE ! # -------- debugging build -------- ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Od -q -R -v ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = alld_s.lib ! else ! LIB_FLAGS = alld.lib ! endif ! else ! ifdef PROFILEMODE ! # -------- profiling build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q -R -v ! SFLAGS = $(WFLAGS) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = allp_s.lib ! else ! LIB_FLAGS = allp.lib ! endif ! else ! # -------- optimised build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q ! SFLAGS = $(WFLAGS) ! LFLAGS = /x /q /Gn ! DELETE_TDS_FILES = 1 ! ifdef STATICLINK ! LIB_FLAGS = alleg_s.lib ! else ! LIB_FLAGS = alleg.lib ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) -Od -q ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! LIB_FLAGS += cw32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib \ ! dinput.lib ddraw.lib winmm.lib dsound.lib ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2BCC = -D__BORLANDC__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! bcc32 $(COMPILE_FLAGS) -W -I. -I./include -c -o$(subst /,\,$@) $(subst /,\,$<) ! endef ! ! define MAKE_LIB_RSP ! $(foreach lib, $(LIB_FLAGS), echo $(subst /,\\,$(lib)) + >> lib.rsp ! ) ! endef ! ! lib.rsp: ! $(MAKE_LIB_RSP) ! ! CLEAN_FILES += lib.rsp ! ! LINK_OBJ_TO_EXE_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_EXE ! ilink32 $(LFLAGS) /aa /Tpe c0w32 $(subst /,\,$<),$(subst /,\,$@),,$(subst /,\,$(IMPLIB_NAME) @lib.rsp) ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_EXE ! $(DO_LINK_OBJ_TO_EXE) ! @del $(subst .exe,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_EXE = $(DO_LINK_OBJ_TO_EXE) ! endif ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! $(foreach objfile, $(LIB_OBJS), tlib /P32 $(subst /,\,$(LIB_NAME) + $(objfile))) ! @del $(subst /,\,$(subst .lib,.BAK,$(LIB_NAME))) ! endef ! else ! # link as a DLL ! LINK_OBJ_TO_LIB_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_LIB ! -del libobj.rsp ! $(foreach libobjfile, $(LIB_OBJS), echo $(subst /,\\,$(libobjfile)) + >> libobj.rsp ! ) ! ilink32 $(LFLAGS) /Tpd c0s32 @libobj.rsp,$(subst /,\,$(DLL_NAME)),,@lib.rsp,$(subst /,\,$(EXPDEF_NAME)) ! del libobj.rsp ! echo LIBRARY $(DLL_BASENAME) > _impccom.def ! copy _impccom.def + $(subst /,\,$(IMPDEF_NAME)) _impdim2.def ! implib $(subst /,\,$(IMPLIB_NAME)) _impdim2.def ! del _impccom.def ! del _impdim2.def ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_LIB ! $(DO_LINK_OBJ_TO_LIB) ! @del $(subst .dll,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_LIB = $(DO_LINK_OBJ_TO_LIB) ! endif ! endif # ifdef STATICLINK ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifneq ($(wildcard $(DJDIR)/bin/cp.exe),) ! HAVE_CP = 1 ! endif ! ! ifndef STATICLINK ! $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! endif ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! INSTALL_HEADERS = $(addprefix $(BCC32DIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) ! ! ifndef STATICLINK ! INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME) ! endif ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) BCC32 library has been installed. ! ! UNINSTALL_FILES = \ ! $(SYSTEM_LIB_DIR)/ccom.lib $(SYSTEM_LIB_DIR)/ccom_s.lib \ ! $(SYSTEM_LIB_DIR)/ccomd.lib $(SYSTEM_LIB_DIR)/ccomd_s.lib \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(WINDIR_U)/ccom$(LIB_VERSION).dll $(WINDIR_U)/ccomd$(LIB_VERSION).dll ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2BCC) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom\/\1\.obj:/" _depend.tmp > obj/bcc32/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd\/\1\.obj:/" _depend.tmp > obj/bcc32/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom_s\/\1\.obj:/" _depend.tmp > obj/bcc32/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd_s\/\1\.obj:/" _depend.tmp > obj/bcc32/ccomd_s/makefile.dep ! rm _depend.tmp --- 1,334 ---- ! # makefile.bcc: ! # Makefile for the CCOM library with Borland C++Builder. ! # Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # You need to set BCC32DIR to the directory where Borland C++Builder is ! # located. ! # ! # This build uses djgpp for calculating source dependencies. ! # The "depend" target uses sed. ! ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = BCC32 ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/bcc32 ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\bcc32 ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/bcc32 ! LIB_DIR_D = $(LIB_ROOT_DIR)\bcc32 ! ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! IMPDEF_NAME = $(LIB_DIR)/impccom.def ! endif ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badbcc32 ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(windir) ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef BCC32DIR ! BCC32DIR_U = $(subst \,/,$(BCC32DIR)) ! BCC32DIR_D = $(subst /,\,$(BCC32DIR)) ! else ! badbcc32: ! @echo You need to set BCC32DIR to the directory where Borland C++Builder is ! @echo located. ! endif ! ! ! SYSTEM_INCLUDE_DIR = $(BCC32DIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(BCC32DIR_D)\include ! SYSTEM_LIB_DIR = $(BCC32DIR_U)/lib ! SYSTEM_LIB_DIR_D = $(BCC32DIR_D)\lib ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! # -------- give a sensible default target for make without any args -------- ! ! .PHONY: _default ! ! _default: default ! ! # -------- decide what compiler options to use -------- ! ! ifdef WARNMODE ! WFLAGS = -w ! else ! WFLAGS = ! endif ! ! ifdef DEBUGMODE ! # -------- debugging build -------- ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Od -q -R -v ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = alld_s.lib ! else ! LIB_FLAGS = alld.lib ! endif ! else ! ifdef PROFILEMODE ! # -------- profiling build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q -R -v ! SFLAGS = $(WFLAGS) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = allp_s.lib ! else ! LIB_FLAGS = allp.lib ! endif ! else ! # -------- optimised build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q ! SFLAGS = $(WFLAGS) ! LFLAGS = /x /q /Gn ! DELETE_TDS_FILES = 1 ! ifdef STATICLINK ! LIB_FLAGS = alleg_s.lib ! else ! LIB_FLAGS = alleg.lib ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) -Od -q ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! LIB_FLAGS += cw32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib \ ! dinput.lib ddraw.lib winmm.lib dsound.lib ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2BCC = -D__BORLANDC__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! bcc32 $(COMPILE_FLAGS) -W -I. -I./include -c -o$(subst /,\,$@) $(subst /,\,$<) ! endef ! ! define MAKE_LIB_RSP ! $(foreach lib, $(LIB_FLAGS), echo $(subst /,\\,$(lib)) + >> lib.rsp ! ) ! endef ! ! lib.rsp: ! $(MAKE_LIB_RSP) ! ! CLEAN_FILES += lib.rsp ! ! LINK_OBJ_TO_EXE_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_EXE ! ilink32 $(LFLAGS) /aa /Tpe c0w32 $(subst /,\,$<),$(subst /,\,$@),,$(subst /,\,$(IMPLIB_NAME) @lib.rsp) ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_EXE ! $(DO_LINK_OBJ_TO_EXE) ! @del $(subst .exe,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_EXE = $(DO_LINK_OBJ_TO_EXE) ! endif ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! $(foreach objfile, $(LIB_OBJS), tlib /P32 $(subst /,\,$(LIB_NAME) + $(objfile))) ! @del $(subst /,\,$(subst .lib,.BAK,$(LIB_NAME))) ! endef ! else ! # link as a DLL ! LINK_OBJ_TO_LIB_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_LIB ! -del libobj.rsp ! $(foreach libobjfile, $(LIB_OBJS), echo $(subst /,\\,$(libobjfile)) + >> libobj.rsp ! ) ! ilink32 $(LFLAGS) /Tpd c0s32 @libobj.rsp,$(subst /,\,$(DLL_NAME)),,@lib.rsp,$(subst /,\,$(EXPDEF_NAME)) ! del libobj.rsp ! echo LIBRARY $(DLL_BASENAME) > _impccom.def ! copy _impccom.def + $(subst /,\,$(IMPDEF_NAME)) _impdim2.def ! implib $(subst /,\,$(IMPLIB_NAME)) _impdim2.def ! del _impccom.def ! del _impdim2.def ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_LIB ! $(DO_LINK_OBJ_TO_LIB) ! @del $(subst .dll,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_LIB = $(DO_LINK_OBJ_TO_LIB) ! endif ! endif # ifdef STATICLINK ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifneq ($(wildcard $(DJDIR)/bin/cp.exe),) ! HAVE_CP = 1 ! endif ! ! ifndef STATICLINK ! $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! endif ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! INSTALL_HEADERS = $(addprefix $(BCC32DIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) ! ! ifndef STATICLINK ! INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME) ! endif ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) BCC32 library has been installed. ! ! UNINSTALL_FILES = \ ! $(SYSTEM_LIB_DIR)/ccom.lib $(SYSTEM_LIB_DIR)/ccom_s.lib \ ! $(SYSTEM_LIB_DIR)/ccomd.lib $(SYSTEM_LIB_DIR)/ccomd_s.lib \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(WINDIR_U)/ccom$(LIB_VERSION).dll $(WINDIR_U)/ccomd$(LIB_VERSION).dll ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2BCC) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom\/\1\.obj:/" _depend.tmp > obj/bcc32/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd\/\1\.obj:/" _depend.tmp > obj/bcc32/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom_s\/\1\.obj:/" _depend.tmp > obj/bcc32/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd_s\/\1\.obj:/" _depend.tmp > obj/bcc32/ccomd_s/makefile.dep ! rm _depend.tmp Index: makefile.dj =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.dj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makefile.dj 21 Jun 2004 19:17:54 -0000 1.5 --- makefile.dj 8 Nov 2004 21:15:21 -0000 1.6 *************** *** 1,279 **** ! # makefile.dj: ! # Makefile for the CCOM library with DJGPP. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = djgpp ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ifndef CROSSCOMPILE ! ifneq ($(LFN),y) ! HTML_SUFFIX = .htm ! INFO_SUFFIX = .inf ! TEXI_SUFFIX = .txi ! _TX_HTML_FLAG = -htm ! _TX_TEXI_FLAG = -txi ! endif ! endif ! ! HAVE_TEXINFO = 1 ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/djgpp ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\djgpp ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/djgpp ! LIB_DIR_D = $(LIB_ROOT_DIR)\djgpp ! ! LIB_BASENAME = lib$(PACKAGE).a ! LIB_NAME = $(LIB_DIR)/$(LIB_BASENAME) ! ! # -------- Find djgpp. -------- ! ! .PHONY: baddjgpp ! ! ifndef DJDIR ! baddjgpp: ! @echo DJDIR variable not set! ! @echo You must set the environment variable DJDIR to point to your djgpp ! @echo directory, e.g. "set DJDIR=c:\djgpp" ! endif ! DJGPPDIR_U = $(subst \,/,$(DJDIR)) ! DJGPPDIR_D = $(subst /,\,$(DJDIR)) ! ! SYSTEM_INCLUDE_DIR = $(DJGPPDIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(DJGPPDIR_D)\include ! SYSTEM_LIB_DIR = $(DJGPPDIR_U)/lib ! SYSTEM_LIB_DIR_D = $(DJGPPDIR_D)/lib ! SYSTEM_INFO_DIR = $(DJGPPDIR_U)/info ! SYSTEM_INFO_DIR = $(DJGPPDIR_D)\info ! ! ifneq (,$(findstring /sh.exe,$(SHELL))) ! UNIX_TOOLS = 1 ! endif ! ! ifdef UNIX_TOOLS ! CP = cp ! RM = rm ! MKDIR = mkdir ! else ! CP = copy ! RM = del ! MKDIR = md ! endif ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS = -g3 ! LIB_FLAGS = -lcgui -lalld ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS = -pg ! LIB_FLAGS = -lcgui -lallp ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS = -s ! LIB_FLAGS = -lcgui -lalleg ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! # This is just so that we can test that CCOM doesn't relies on Allegro ! # including some standard header. ! ifdef CCOM_NO_ALLEGRO_STD_HEADERS ! CFLAGS += -DALLEGRO_NO_STD_HEADERS -DEDOM=1 -DERANGE=1 ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2DJGPP = -DDJGPP=2 -U__unix__ ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIB_FLAGS) ! endef ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifdef CROSSCOMPILE ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! mkdir $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! cp $(subst \,/,$< $@) ! install-info $(subst \,/,$@) $(SYSTEM_INFO_DIR)/dir ! ! else # ifdef CROSSCOMPILE ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! $(MKDIR) $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! $(CP) $(subst /,\,$< $@) ! ! endif # ifdef CROSSCOMPILE else ! ! ! INSTALL_HEADERS = $(addprefix $(DJGPPDIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(LIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) djgpp library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom.a $(SYSTEM_LIB_DIR)/libccomd.a \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! ! ! # -------- Compile anything that can't be done in makefile.all. -------- ! ! # this section is empty ! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2DJGPP) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c $(wildcard docs/*.c src/misc/*.c) > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccom\/\1/" _depend.tmp > obj/djgpp/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccomd\/\1/" _depend.tmp > obj/djgpp/ccomd/makefile.dep ! rm _depend.tmp --- 1,279 ---- ! # makefile.dj: ! # Makefile for the CCOM library with DJGPP. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = djgpp ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ifndef CROSSCOMPILE ! ifneq ($(LFN),y) ! HTML_SUFFIX = .htm ! INFO_SUFFIX = .inf ! TEXI_SUFFIX = .txi ! _TX_HTML_FLAG = -htm ! _TX_TEXI_FLAG = -txi ! endif ! endif ! ! HAVE_TEXINFO = 1 ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/djgpp ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\djgpp ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/djgpp ! LIB_DIR_D = $(LIB_ROOT_DIR)\djgpp ! ! LIB_BASENAME = lib$(PACKAGE).a ! LIB_NAME = $(LIB_DIR)/$(LIB_BASENAME) ! ! # -------- Find djgpp. -------- ! ! .PHONY: baddjgpp ! ! ifndef DJDIR ! baddjgpp: ! @echo DJDIR variable not set! ! @echo You must set the environment variable DJDIR to point to your djgpp ! @echo directory, e.g. "set DJDIR=c:\djgpp" ! endif ! DJGPPDIR_U = $(subst \,/,$(DJDIR)) ! DJGPPDIR_D = $(subst /,\,$(DJDIR)) ! ! SYSTEM_INCLUDE_DIR = $(DJGPPDIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(DJGPPDIR_D)\include ! SYSTEM_LIB_DIR = $(DJGPPDIR_U)/lib ! SYSTEM_LIB_DIR_D = $(DJGPPDIR_D)/lib ! SYSTEM_INFO_DIR = $(DJGPPDIR_U)/info ! SYSTEM_INFO_DIR = $(DJGPPDIR_D)\info ! ! ifneq (,$(findstring /sh.exe,$(SHELL))) ! UNIX_TOOLS = 1 ! endif ! ! ifdef UNIX_TOOLS ! CP = cp ! RM = rm ! MKDIR = mkdir ! else ! CP = copy ! RM = del ! MKDIR = md ! endif ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS = -g3 ! LIB_FLAGS = -lcgui -lalld ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS = -pg ! LIB_FLAGS = -lcgui -lallp ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS = -s ! LIB_FLAGS = -lcgui -lalleg ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! # This is just so that we can test that CCOM doesn't relies on Allegro ! # including some standard header. ! ifdef CCOM_NO_ALLEGRO_STD_HEADERS ! CFLAGS += -DALLEGRO_NO_STD_HEADERS -DEDOM=1 -DERANGE=1 ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2DJGPP = -DDJGPP=2 -U__unix__ ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIB_FLAGS) ! endef ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifdef CROSSCOMPILE ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! mkdir $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! cp $(subst \,/,$< $@) ! install-info $(subst \,/,$@) $(SYSTEM_INFO_DIR)/dir ! ! else # ifdef CROSSCOMPILE ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! $(MKDIR) $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! $(CP) $(subst /,\,$< $@) ! ! endif # ifdef CROSSCOMPILE else ! ! ! INSTALL_HEADERS = $(addprefix $(DJGPPDIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(LIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) djgpp library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom.a $(SYSTEM_LIB_DIR)/libccomd.a \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! ! ! # -------- Compile anything that can't be done in makefile.all. -------- ! ! # this section is empty ! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2DJGPP) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c $(wildcard docs/*.c src/misc/*.c) > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccom\/\1/" _depend.tmp > obj/djgpp/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccomd\/\1/" _depend.tmp > obj/djgpp/ccomd/makefile.dep ! rm _depend.tmp Index: makefile.vc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.vc,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** makefile.vc 21 Jun 2004 19:17:54 -0000 1.10 --- makefile.vc 8 Nov 2004 21:15:21 -0000 1.11 *************** *** 1,318 **** ! # makefile.vc: ! # Makefile for the CCOM library with MSVC. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # ! # To path MSVC so it can be used from the commandline, run the ! # vcvars32.bat file which can be found in your MSVC bin directory. ! # ! # This build uses djgpp for calculating ! # source dependencies, so you'll need to have that installed as well. ! # ! # The "depend" target uses sed. ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = MSVC ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/msvc ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\msvc ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/msvc ! LIB_DIR_D = $(LIB_ROOT_DIR)\msvc ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badmsvc badspaces ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(WINDIR) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef MSVCDIR ! MSVCDIR_U = $(subst \,/,$(MSVCDIR)) ! MSVCDIR_D = $(subst /,\,$(MSVCDIR)) ! else ! ifdef MSDEVDIR ! MSVCDIR_U = $(subst \,/,$(MSDEVDIR)) ! MSVCDIR_D = $(subst /,\,$(MSDEVDIR)) ! else ! badmsvc: ! @echo Your MSVCDIR or MSDEVDIR environment variable is not set! ! endif ! endif ! ! NULLSTRING := ! SPACE := $(NULLSTRING) # special magic to get an isolated space character ! ! ifneq ($(findstring $(SPACE),$(MSVCDIR)$(MSDEVDIR)),) ! badspaces: ! @echo There are spaces in your MSVCDIR or MSDEVDIR environment ! @echo variables: please change these to the 8.3 short filename ! @echo version, or move your compiler to a different directory. ! endif ! ! SYSTEM_INCLUDE_DIR = $(MSVCDIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(MSVCDIR_D)\include ! SYSTEM_LIB_DIR = $(MSVCDIR_U)/lib ! SYSTEM_LIB_DIR_D = $(MSVCDIR_D)\lib ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! RUNNER = $(CGUIDIR)/obj/msvc/runner$(EXE_SUFFIX) ! ! .PHONY: _default ! ! _default: default ! ! # -------- decide what compiler options to use -------- ! ! ifdef WARNMODE ! WFLAGS = -W3 -WX ! else ! WFLAGS = -W1 ! endif ! ! ifdef DEBUGMODE ! # -------- debugging build -------- ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Gd -Zi -MDd ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) -Wall ! LFLAGS = -debug -debugtype:cv ! ifdef STATICLINK ! LIB_FLAGS = cgui_s.lib alld_s.lib ! else ! LIB_FLAGS = cgui.lib alld.lib ! endif ! else ! ifdef PROFILEMODE ! # -------- profiling build -------- ! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD ! SFLAGS = -Wall ! LFLAGS = -profile ! ifdef STATICLINK ! LIB_FLAGS = cgui_s.lib allp_s.lib ! else ! LIB_FLAGS = cgui.lib allp.lib ! endif ! else ! # -------- optimised build -------- ! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD ! SFLAGS = -Wall ! LFLAGS = -release ! ifdef STATICLINK ! LIB_FLAGS = cgui_s.lib alleg_s.lib ! else ! LIB_FLAGS = cgui.lib alleg.lib ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) -Gd -MT ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK ! endif ! ! LIB_FLAGS += kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib \ ! dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! ! # -------- Define how to compile. -------- ! ! GCC2MSVC = -D_MSC_VER -D_WIN32 -D_M_IX86 -U__GNUC__ -UDJGPP -U__unix__ ! ! define COMPILE_C_TO_OBJ ! $(RUNNER) cl @ -nologo $(COMPILE_FLAGS) -I./include -Fo$@ -c $< ! endef ! ! define LINK_OBJ_TO_EXE ! $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:windows -out:$@ $< $(IMPLIB_NAME) $(LIB_FLAGS) ! endef ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! $(RUNNER) lib @ -nologo -out:$(LIB_NAME) $(LIB_OBJS) ! endef ! else ! # link as a DLL ! define LINK_OBJ_TO_LIB ! $(RUNNER) link @ -nologo $(LFLAGS) -dll -def:$(EXPDEF_NAME) -out:$(DLL_NAME) -implib:$(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS) ! endef ! endif # ifdef STATICLINK ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifneq ($(wildcard $(DJDIR)/bin/cp.exe),) ! HAVE_CP = 1 ! endif ! ! ifndef STATICLINK ! $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! endif ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! ! INSTALL_HEADERS = $(addprefix $(MSVCDIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) ! ! ifndef STATICLINK ! INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME) ! endif ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) MSVC library has been installed. ! ! UNINSTALL_FILES = \ ! $(SYSTEM_LIB_DIR)/ccom.lib $(SYSTEM_LIB_DIR)/ccom_s.lib \ ! $(SYSTEM_LIB_DIR)/ccomd.lib $(SYSTEM_LIB_DIR)/ccomd_s.lib \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(WINDIR_U)/ccom$(LIB_VERSION).dll $(WINDIR_U)/ccomd$(LIB_VERSION).dll ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2MSVC) -MM -MG -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c $(wildcard docs/*.c src/misc/*.c) > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccom\/\1\.obj:/" _depend.tmp > obj/msvc/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccomd\/\1\.obj:/" _depend.tmp > obj/msvc/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccom_s\/\1\.obj:/" _depend.tmp > obj/msvc/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccomd_s\/\1\.obj:/" _depend.tmp > obj/msvc/ccomd_s/makefile.dep ! rm _depend.tmp --- 1,318 ---- ! # makefile.vc: ! # Makefile for the CCOM library with MSVC. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # ! # To path MSVC so it can be used from the commandline, run the ! # vcvars32.bat file which can be found in your MSVC bin directory. ! # ! # This build uses djgpp for calculating ! # source dependencies, so you'll need to have that installed as well. ! # ! # The "depend" target uses sed. ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = MSVC ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/msvc ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\msvc ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/msvc ! LIB_DIR_D = $(LIB_ROOT_DIR)\msvc ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badmsvc badspaces ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(WINDIR) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef MSVCDIR ! MSVCDIR_U = $(subst \,/,$(MSVCDIR)) ! MSVCDIR_D = $(subst /,\,$(MSVCDIR)) ! else ! ifdef MSDEVDIR ! MSVCDIR_U = $(subst \,/,$(MSDEVDIR)) ! MSVCDIR_D = $(subst /,\,$(MSDEVDIR)) ! else ! badmsvc: ! @echo Your MSVCDIR or MSDEVDIR environment variable is not set! ! endif ! endif ! ! NULLSTRING := ! SPACE := $(NULLSTRING) # special magic to get an isolated space character ! ! ifneq ($(findstring $(SPACE),$(MSVCDIR)$(MSDEVDIR)),) ! badspaces: ! @echo There are spaces in your MSVCDIR or MSDEVDIR environment ! @echo variables: please change these to the 8.... [truncated message content] |
From: Christer S. <ch...@us...> - 2004-06-21 19:18:09
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15985/misc Modified Files: makefile.all makefile.bcc makefile.dj makefile.mgw makefile.uni makefile.vc makefile.ver zipup.sh Log Message: fixed some build issues Index: makefile.uni =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.uni,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** makefile.uni 8 Feb 2004 20:47:22 -0000 1.3 --- makefile.uni 21 Jun 2004 19:17:54 -0000 1.4 *************** *** 1,227 **** ! # makefile.uni: ! # Makefile for the CCOM library with Unix. Should not be used directly! ! # ! # By Christer Sandberg (copied from ADIME made by Sven Sandberg) ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = UNIX ! ! EXE_SUFFIX = ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/unix ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/unix ! ! HAVE_TEXINFO = 1 ! ! ifdef STATICLINK # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! IMPLIB_BASENAME = lib$(PACKAGE)_s.a ! else # link as a shared object ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! IMPLIB_BASENAME = lib$(PACKAGE).so ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Default system paths. ------------ ! ! ifndef SYSTEM_DIR ! SYSTEM_DIR = /usr/local ! endif ! SYSTEM_INCLUDE_DIR = $(SYSTEM_DIR)/include ! SYSTEM_LIB_DIR = $(SYSTEM_DIR)/lib ! ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(ALLEGRO_DAT_X) ! CGUI_DAT2C = $(CGUI_DAT2C_X) ! CCOM_DAT = $(CCOM_DAT_X) ! CCOM_DAT_C = $(CCOM_DAT_C_X) ! CCOM_DAT_H = $(CCOM_DAT_H_X) ! CCOM_LABELS = $(CCOM_LABELS_X) ! TEXT_SOURCES = $(TEXT_SOURCES_X) ! TEXT_HEADERS = $(TEXT_HEADERS_X) ! MKTEXT = $(MKTEXT_X) ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef STATICLINK ! ALLEGRO_CONFIG_FLAGS = --static ! LIB_FLAGS = -lcgui_s ! else ! ALLEGRO_CONFIG_FLAGS = --shared ! LIB_FLAGS = -lcgui ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS += -g ! LIB_FLAGS += `allegro-config --libs debug $(ALLEGRO_CONFIG_FLAGS)` ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS += -pg ! LIB_FLAGS += `allegro-config --libs profile $(ALLEGRO_CONFIG_FLAGS)` ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS += -s ! LIB_FLAGS += `allegro-config --libs release $(ALLEGRO_CONFIG_FLAGS)` ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! ifdef PROFILEMODE ! LIB_FLAGS += -lgmon ! endif ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2UNIX = -D__UNIX__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS) ! endef ! else ! # link as a shared object ! define LINK_OBJ_TO_LIB ! gcc $(LFLAGS) -shared -o $(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< -L$(LIB_DIR) -lccom $(LIB_FLAGS) ! endef ! endif ! ! # -------- Rules for installing and removing the library files. -------- ! ! # If you don't have the install command, you may use cp and mkdir, but ! # this will not set permissions. ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! install -m 755 -d $(SYSTEM_LIB_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! install -m 755 -d $(SYSTEM_INCLUDE_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! install -m 755 -d $(SYSTEM_INCLUDE_DIR)/ccom ! install -m 644 $< $@ ! ! ! INSTALL_HEADERS = $(addprefix $(SYSTEM_DIR)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(INSTALL_HEADERS) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) UNIX library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom_s.a $(SYSTEM_LIB_DIR)/libccomd_s.a \ ! $(SYSTEM_LIB_DIR)/libccom.so $(SYSTEM_LIB_DIR)/libccomd.so \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- generate automatic dependencies -------- ! ! DEPEND_PARAMS = $(GCC2UNIX) -MM -MG -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^[a-zA-Z0-9_\/]*\///" -e "s/[a-zA-Z0-9_\/.:-]*version.h//" _depend.tmp > _depend2.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom\/\1\.o:/" _depend2.tmp > obj/unix/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd\/\1\.o:/" _depend2.tmp > obj/unix/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom_s\/\1\.o:/" _depend2.tmp > obj/unix/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd_s\/\1\.o:/" _depend2.tmp > obj/unix/ccomd_s/makefile.dep ! rm _depend.tmp _depend2.tmp --- 1,226 ---- ! # makefile.uni: ! # Makefile for the CCOM library with Unix. Should not be used directly! ! # ! # By Christer Sandberg (copied from ADIME made by Sven Sandberg) ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = UNIX ! ! EXE_SUFFIX = ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/unix ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/unix ! ! HAVE_TEXINFO = 1 ! ! ifdef STATICLINK # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! IMPLIB_BASENAME = lib$(PACKAGE)_s.a ! else # link as a shared object ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! IMPLIB_BASENAME = lib$(PACKAGE).so ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Default system paths. ------------ ! ! ifndef SYSTEM_DIR ! SYSTEM_DIR = /usr/local ! endif ! SYSTEM_INCLUDE_DIR = $(SYSTEM_DIR)/include ! SYSTEM_LIB_DIR = $(SYSTEM_DIR)/lib ! ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(ALLEGRO_DAT_X) ! CGUI_DAT2C = $(CGUI_DAT2C_X) ! CCOM_DAT = $(CCOM_DAT_X) ! CCOM_DAT_C = $(CCOM_DAT_C_X) ! CCOM_DAT_H = $(CCOM_DAT_H_X) ! CCOM_LABELS = $(CCOM_LABELS_X) ! TEXT_SOURCES = $(TEXT_SOURCES_X) ! TEXT_HEADERS = $(TEXT_HEADERS_X) ! MKTEXT = $(MKTEXT_X) ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef STATICLINK ! ALLEGRO_CONFIG_FLAGS = --static ! LIB_FLAGS = -lcgui_s ! else ! ALLEGRO_CONFIG_FLAGS = --shared ! LIB_FLAGS = -lcgui ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS += -g ! LIB_FLAGS += `allegro-config --libs debug $(ALLEGRO_CONFIG_FLAGS)` ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS += -pg ! LIB_FLAGS += `allegro-config --libs profile $(ALLEGRO_CONFIG_FLAGS)` ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS += -s ! LIB_FLAGS += `allegro-config --libs release $(ALLEGRO_CONFIG_FLAGS)` ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! ifdef PROFILEMODE ! LIB_FLAGS += -lgmon ! endif ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2UNIX = -D__UNIX__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(IMPLIB_NAME) $(LIB_FLAGS) ! endef ! else ! # link as a shared object ! define LINK_OBJ_TO_LIB ! gcc $(LFLAGS) -shared -o $(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< -L$(LIB_DIR) -lccom $(LIB_FLAGS) ! endef ! endif ! ! # -------- Rules for installing and removing the library files. -------- ! ! # If you don't have the install command, you may use cp and mkdir, but ! # this will not set permissions. ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! install -m 755 -d $(SYSTEM_LIB_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! install -m 755 -d $(SYSTEM_INCLUDE_DIR) ! install -m 644 $< $@ ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! install -m 755 -d $(SYSTEM_INCLUDE_DIR)/ccom ! install -m 644 $< $@ ! ! ! INSTALL_HEADERS = $(addprefix $(SYSTEM_DIR)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(INSTALL_HEADERS) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) UNIX library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom_s.a $(SYSTEM_LIB_DIR)/libccomd_s.a \ ! $(SYSTEM_LIB_DIR)/libccom.so $(SYSTEM_LIB_DIR)/libccomd.so \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- generate automatic dependencies -------- ! ! DEPEND_PARAMS = $(GCC2UNIX) -MM -MG -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom\/\1\.o:/" _depend.tmp > obj/unix/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd\/\1\.o:/" _depend.tmp > obj/unix/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccom_s\/\1\.o:/" _depend.tmp > obj/unix/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/unix\/ccomd_s\/\1\.o:/" _depend.tmp > obj/unix/ccomd_s/makefile.dep ! rm _depend.tmp Index: makefile.ver =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.ver,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makefile.ver 8 Feb 2004 20:47:22 -0000 1.5 --- makefile.ver 21 Jun 2004 19:17:54 -0000 1.6 *************** *** 1,10 **** ! # version numbers included by the main makefile ! # this file is patched by fixver.sh ! ! # DLL filename number for Windows ! LIB_VERSION = 10 ! ! # Shared library versions for Unix ! # todo: this is unused at the moment ! shared_version = 1.0.0 ! shared_major_minor = 1.0 --- 1,10 ---- ! # version numbers included by the main makefile ! # this file is patched by fixver.sh ! ! # DLL filename number for Windows ! LIB_VERSION = 09 ! ! # Shared library versions for Unix ! # todo: this is unused at the moment ! shared_version = 0.9.2 ! shared_major_minor = 0.9 Index: makefile.bcc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.bcc,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makefile.bcc 8 Feb 2004 20:47:21 -0000 1.4 --- makefile.bcc 21 Jun 2004 19:17:54 -0000 1.5 *************** *** 1,323 **** ! # makefile.bcc: ! # Makefile for the CCOM library with Borland C++Builder. ! # Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # You need to set BCC32DIR to the directory where Borland C++Builder is ! # located. ! # ! # This build uses djgpp for calculating source dependencies. ! # The "depend" target uses sed. ! ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = BCC32 ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/bcc32 ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\bcc32 ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/bcc32 ! LIB_DIR_D = $(LIB_ROOT_DIR)\bcc32 ! ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! IMPDEF_NAME = $(LIB_DIR)/impccom.def ! endif ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badbcc32 ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(windir) ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef BCC32DIR ! BCC32DIR_U = $(subst \,/,$(BCC32DIR)) ! BCC32DIR_D = $(subst /,\,$(BCC32DIR)) ! else ! badbcc32: ! @echo You need to set BCC32DIR to the directory where Borland C++Builder is ! @echo located. ! endif ! ! ! SYSTEM_INCLUDE_DIR = $(BCC32DIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(BCC32DIR_D)\include ! SYSTEM_LIB_DIR = $(BCC32DIR_U)/lib ! SYSTEM_LIB_DIR_D = $(BCC32DIR_D)\lib ! ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(CGUI_DAT2C_X) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! ! # -------- give a sensible default target for make without any args -------- ! ! .PHONY: _default ! ! _default: default ! ! # -------- decide what compiler options to use -------- ! ! ifdef WARNMODE ! WFLAGS = -w ! else ! WFLAGS = ! endif ! ! ifdef DEBUGMODE ! # -------- debugging build -------- ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Od -q -R -v ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = alld_s.lib ! else ! LIB_FLAGS = alld.lib ! endif ! else ! ifdef PROFILEMODE ! # -------- profiling build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q -R -v ! SFLAGS = $(WFLAGS) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = allp_s.lib ! else ! LIB_FLAGS = allp.lib ! endif ! else ! # -------- optimised build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q ! SFLAGS = $(WFLAGS) ! LFLAGS = /x /q /Gn ! DELETE_TDS_FILES = 1 ! ifdef STATICLINK ! LIB_FLAGS = alleg_s.lib ! else ! LIB_FLAGS = alleg.lib ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) -Od -q ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! LIB_FLAGS += cw32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib \ ! dinput.lib ddraw.lib winmm.lib dsound.lib ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2BCC = -D__BORLANDC__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! bcc32 $(COMPILE_FLAGS) -W -I. -I./include -c -o$(subst /,\,$@) $(subst /,\,$<) ! endef ! ! define MAKE_LIB_RSP ! $(foreach lib, $(LIB_FLAGS), echo $(subst /,\\,$(lib)) + >> lib.rsp ! ) ! endef ! ! lib.rsp: ! $(MAKE_LIB_RSP) ! ! CLEAN_FILES += lib.rsp ! ! LINK_OBJ_TO_EXE_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_EXE ! ilink32 $(LFLAGS) /aa /Tpe c0w32 $(subst /,\,$<),$(subst /,\,$@),,$(subst /,\,$(IMPLIB_NAME) @lib.rsp) ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_EXE ! $(DO_LINK_OBJ_TO_EXE) ! @del $(subst .exe,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_EXE = $(DO_LINK_OBJ_TO_EXE) ! endif ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! $(foreach objfile, $(LIB_OBJS), tlib /P32 $(subst /,\,$(LIB_NAME) + $(objfile))) ! @del $(subst /,\,$(subst .lib,.BAK,$(LIB_NAME))) ! endef ! else ! # link as a DLL ! LINK_OBJ_TO_LIB_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_LIB ! -del libobj.rsp ! $(foreach libobjfile, $(LIB_OBJS), echo $(subst /,\\,$(libobjfile)) + >> libobj.rsp ! ) ! ilink32 $(LFLAGS) /Tpd c0s32 @libobj.rsp,$(subst /,\,$(DLL_NAME)),,@lib.rsp,$(subst /,\,$(EXPDEF_NAME)) ! del libobj.rsp ! echo LIBRARY $(DLL_BASENAME) > _impccom.def ! copy _impccom.def + $(subst /,\,$(IMPDEF_NAME)) _impdim2.def ! implib $(subst /,\,$(IMPLIB_NAME)) _impdim2.def ! del _impccom.def ! del _impdim2.def ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_LIB ! $(DO_LINK_OBJ_TO_LIB) ! @del $(subst .dll,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_LIB = $(DO_LINK_OBJ_TO_LIB) ! endif ! endif # ifdef STATICLINK ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifneq ($(wildcard $(DJDIR)/bin/cp.exe),) ! HAVE_CP = 1 ! endif ! ! ifndef STATICLINK ! $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! endif ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! INSTALL_HEADERS = $(addprefix $(BCC32DIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) ! ! ifndef STATICLINK ! INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME) ! endif ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) BCC32 library has been installed. ! ! UNINSTALL_FILES = \ ! $(SYSTEM_LIB_DIR)/ccom.lib $(SYSTEM_LIB_DIR)/ccom_s.lib \ ! $(SYSTEM_LIB_DIR)/ccomd.lib $(SYSTEM_LIB_DIR)/ccomd_s.lib \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(WINDIR_U)/ccom$(LIB_VERSION).dll $(WINDIR_U)/ccomd$(LIB_VERSION).dll ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2BCC) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^[a-zA-Z0-9_\/]*\///" -e "s/[^ ]*version\.h//" -e "s/[^ ]*djgpp\.ver//" -e "s/[^ ]*allegro[^ ]*//g" -e"/^ *\\/d" _depend.tmp > _depend2.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom\/\1\.obj:/" _depend2.tmp > obj/bcc32/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd\/\1\.obj:/" _depend2.tmp > obj/bcc32/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom_s\/\1\.obj:/" _depend2.tmp > obj/bcc32/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd_s\/\1\.obj:/" _depend2.tmp > obj/bcc32/ccomd_s/makefile.dep ! rm _depend.tmp _depend2.tmp --- 1,334 ---- ! # makefile.bcc: ! # Makefile for the CCOM library with Borland C++Builder. ! # Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # You need to set BCC32DIR to the directory where Borland C++Builder is ! # located. ! # ! # This build uses djgpp for calculating source dependencies. ! # The "depend" target uses sed. ! ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = BCC32 ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/bcc32 ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\bcc32 ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/bcc32 ! LIB_DIR_D = $(LIB_ROOT_DIR)\bcc32 ! ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! IMPDEF_NAME = $(LIB_DIR)/impccom.def ! endif ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badbcc32 ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(windir) ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef BCC32DIR ! BCC32DIR_U = $(subst \,/,$(BCC32DIR)) ! BCC32DIR_D = $(subst /,\,$(BCC32DIR)) ! else ! badbcc32: ! @echo You need to set BCC32DIR to the directory where Borland C++Builder is ! @echo located. ! endif ! ! ! SYSTEM_INCLUDE_DIR = $(BCC32DIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(BCC32DIR_D)\include ! SYSTEM_LIB_DIR = $(BCC32DIR_U)/lib ! SYSTEM_LIB_DIR_D = $(BCC32DIR_D)\lib ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! # -------- give a sensible default target for make without any args -------- ! ! .PHONY: _default ! ! _default: default ! ! # -------- decide what compiler options to use -------- ! ! ifdef WARNMODE ! WFLAGS = -w ! else ! WFLAGS = ! endif ! ! ifdef DEBUGMODE ! # -------- debugging build -------- ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Od -q -R -v ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = alld_s.lib ! else ! LIB_FLAGS = alld.lib ! endif ! else ! ifdef PROFILEMODE ! # -------- profiling build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q -R -v ! SFLAGS = $(WFLAGS) ! LFLAGS = /q /Gn /v ! ifdef STATICLINK ! LIB_FLAGS = allp_s.lib ! else ! LIB_FLAGS = allp.lib ! endif ! else ! # -------- optimised build -------- ! CFLAGS = $(WFLAGS) -O2 -OS -q ! SFLAGS = $(WFLAGS) ! LFLAGS = /x /q /Gn ! DELETE_TDS_FILES = 1 ! ifdef STATICLINK ! LIB_FLAGS = alleg_s.lib ! else ! LIB_FLAGS = alleg.lib ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) -Od -q ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK ! endif ! ! LIB_FLAGS += cw32.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib \ ! dinput.lib ddraw.lib winmm.lib dsound.lib ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2BCC = -D__BORLANDC__ -UDJGPP ! ! define COMPILE_C_TO_OBJ ! bcc32 $(COMPILE_FLAGS) -W -I. -I./include -c -o$(subst /,\,$@) $(subst /,\,$<) ! endef ! ! define MAKE_LIB_RSP ! $(foreach lib, $(LIB_FLAGS), echo $(subst /,\\,$(lib)) + >> lib.rsp ! ) ! endef ! ! lib.rsp: ! $(MAKE_LIB_RSP) ! ! CLEAN_FILES += lib.rsp ! ! LINK_OBJ_TO_EXE_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_EXE ! ilink32 $(LFLAGS) /aa /Tpe c0w32 $(subst /,\,$<),$(subst /,\,$@),,$(subst /,\,$(IMPLIB_NAME) @lib.rsp) ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_EXE ! $(DO_LINK_OBJ_TO_EXE) ! @del $(subst .exe,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_EXE = $(DO_LINK_OBJ_TO_EXE) ! endif ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! $(foreach objfile, $(LIB_OBJS), tlib /P32 $(subst /,\,$(LIB_NAME) + $(objfile))) ! @del $(subst /,\,$(subst .lib,.BAK,$(LIB_NAME))) ! endef ! else ! # link as a DLL ! LINK_OBJ_TO_LIB_DEPS = lib.rsp ! define DO_LINK_OBJ_TO_LIB ! -del libobj.rsp ! $(foreach libobjfile, $(LIB_OBJS), echo $(subst /,\\,$(libobjfile)) + >> libobj.rsp ! ) ! ilink32 $(LFLAGS) /Tpd c0s32 @libobj.rsp,$(subst /,\,$(DLL_NAME)),,@lib.rsp,$(subst /,\,$(EXPDEF_NAME)) ! del libobj.rsp ! echo LIBRARY $(DLL_BASENAME) > _impccom.def ! copy _impccom.def + $(subst /,\,$(IMPDEF_NAME)) _impdim2.def ! implib $(subst /,\,$(IMPLIB_NAME)) _impdim2.def ! del _impccom.def ! del _impdim2.def ! endef ! ifdef DELETE_TDS_FILES ! define LINK_OBJ_TO_LIB ! $(DO_LINK_OBJ_TO_LIB) ! @del $(subst .dll,.tds,$(subst /,\,$@)) ! endef ! else ! LINK_OBJ_TO_LIB = $(DO_LINK_OBJ_TO_LIB) ! endif ! endif # ifdef STATICLINK ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifneq ($(wildcard $(DJDIR)/bin/cp.exe),) ! HAVE_CP = 1 ! endif ! ! ifndef STATICLINK ! $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! endif ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! INSTALL_HEADERS = $(addprefix $(BCC32DIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) ! ! ifndef STATICLINK ! INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME) ! endif ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) BCC32 library has been installed. ! ! UNINSTALL_FILES = \ ! $(SYSTEM_LIB_DIR)/ccom.lib $(SYSTEM_LIB_DIR)/ccom_s.lib \ ! $(SYSTEM_LIB_DIR)/ccomd.lib $(SYSTEM_LIB_DIR)/ccomd_s.lib \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(WINDIR_U)/ccom$(LIB_VERSION).dll $(WINDIR_U)/ccomd$(LIB_VERSION).dll ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2BCC) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom\/\1\.obj:/" _depend.tmp > obj/bcc32/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd\/\1\.obj:/" _depend.tmp > obj/bcc32/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccom_s\/\1\.obj:/" _depend.tmp > obj/bcc32/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/bcc32\/ccomd_s\/\1\.obj:/" _depend.tmp > obj/bcc32/ccomd_s/makefile.dep ! rm _depend.tmp Index: makefile.dj =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.dj,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makefile.dj 24 May 2004 00:23:20 -0000 1.4 --- makefile.dj 21 Jun 2004 19:17:54 -0000 1.5 *************** *** 1,267 **** ! # makefile.dj: ! # Makefile for the CCOM library with DJGPP. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = djgpp ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ifndef CROSSCOMPILE ! ifneq ($(LFN),y) ! HTML_SUFFIX = .htm ! INFO_SUFFIX = .inf ! TEXI_SUFFIX = .txi ! _TX_HTML_FLAG = -htm ! _TX_TEXI_FLAG = -txi ! endif ! endif ! ! HAVE_TEXINFO = 1 ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/djgpp ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\djgpp ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/djgpp ! LIB_DIR_D = $(LIB_ROOT_DIR)\djgpp ! ! LIB_BASENAME = lib$(PACKAGE).a ! LIB_NAME = $(LIB_DIR)/$(LIB_BASENAME) ! ! # -------- Find djgpp. -------- ! ! .PHONY: baddjgpp ! ! ifndef DJDIR ! baddjgpp: ! @echo DJDIR variable not set! ! @echo You must set the environment variable DJDIR to point to your djgpp ! @echo directory, e.g. "set DJDIR=c:\djgpp" ! endif ! DJGPPDIR_U = $(subst \,/,$(DJDIR)) ! DJGPPDIR_D = $(subst /,\,$(DJDIR)) ! ! SYSTEM_INCLUDE_DIR = $(DJGPPDIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(DJGPPDIR_D)\include ! SYSTEM_LIB_DIR = $(DJGPPDIR_U)/lib ! SYSTEM_LIB_DIR_D = $(DJGPPDIR_D)/lib ! SYSTEM_INFO_DIR = $(DJGPPDIR_U)/info ! SYSTEM_INFO_DIR = $(DJGPPDIR_D)\info ! ! ifneq (,$(findstring /sh.exe,$(SHELL))) ! UNIX_TOOLS = 1 ! endif ! ! ifdef UNIX_TOOLS ! CP = cp ! RM = rm ! MKDIR = mkdir ! else ! CP = copy ! RM = del ! MKDIR = md ! endif ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(CGUI_DAT2C_X) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS = -g3 ! LIB_FLAGS = -lcgui -lalld ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS = -pg ! LIB_FLAGS = -lcgui -lallp ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS = -s ! LIB_FLAGS = -lcgui -lalleg ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! # This is just so that we can test that CCOM doesn't relies on Allegro ! # including some standard header. ! ifdef CCOM_NO_ALLEGRO_STD_HEADERS ! CFLAGS += -DALLEGRO_NO_STD_HEADERS -DEDOM=1 -DERANGE=1 ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2DJGPP = -DDJGPP=2 -U__unix__ ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIB_FLAGS) ! endef ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifdef CROSSCOMPILE ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! mkdir $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! cp $(subst \,/,$< $@) ! install-info $(subst \,/,$@) $(SYSTEM_INFO_DIR)/dir ! ! else # ifdef CROSSCOMPILE ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! $(MKDIR) $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! $(CP) $(subst /,\,$< $@) ! ! endif # ifdef CROSSCOMPILE else ! ! ! INSTALL_HEADERS = $(addprefix $(DJGPPDIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(LIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) djgpp library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom.a $(SYSTEM_LIB_DIR)/libccomd.a \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! ! ! # -------- Compile anything that can't be done in makefile.all. -------- ! ! # this section is empty ! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2DJGPP) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c $(wildcard docs/*.c src/misc/*.c) > _depend.tmp ! sed -e "s/^[a-zA-Z0-9_\/]*\///" -e "s/[^ ]*version\.h//" -e "s/[^ ]*djgpp\.ver//" -e "s/[^ ]*allegro[^ ]*//g" -e"/^ *\\/d" _depend.tmp > _depend2.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccom\/\1/" _depend2.tmp > obj/djgpp/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccomd\/\1/" _depend2.tmp > obj/djgpp/ccomd/makefile.dep ! rm _depend.tmp _depend2.tmp --- 1,279 ---- ! # makefile.dj: ! # Makefile for the CCOM library with DJGPP. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! ! # -------- Define some variables that the primary makefile may use. -------- ! ! PLATFORM = djgpp ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .o ! LIB_SUFFIX = .a ! ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ifndef CROSSCOMPILE ! ifneq ($(LFN),y) ! HTML_SUFFIX = .htm ! INFO_SUFFIX = .inf ! TEXI_SUFFIX = .txi ! _TX_HTML_FLAG = -htm ! _TX_TEXI_FLAG = -txi ! endif ! endif ! ! HAVE_TEXINFO = 1 ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/djgpp ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\djgpp ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/djgpp ! LIB_DIR_D = $(LIB_ROOT_DIR)\djgpp ! ! LIB_BASENAME = lib$(PACKAGE).a ! LIB_NAME = $(LIB_DIR)/$(LIB_BASENAME) ! ! # -------- Find djgpp. -------- ! ! .PHONY: baddjgpp ! ! ifndef DJDIR ! baddjgpp: ! @echo DJDIR variable not set! ! @echo You must set the environment variable DJDIR to point to your djgpp ! @echo directory, e.g. "set DJDIR=c:\djgpp" ! endif ! DJGPPDIR_U = $(subst \,/,$(DJDIR)) ! DJGPPDIR_D = $(subst /,\,$(DJDIR)) ! ! SYSTEM_INCLUDE_DIR = $(DJGPPDIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(DJGPPDIR_D)\include ! SYSTEM_LIB_DIR = $(DJGPPDIR_U)/lib ! SYSTEM_LIB_DIR_D = $(DJGPPDIR_D)/lib ! SYSTEM_INFO_DIR = $(DJGPPDIR_U)/info ! SYSTEM_INFO_DIR = $(DJGPPDIR_D)\info ! ! ifneq (,$(findstring /sh.exe,$(SHELL))) ! UNIX_TOOLS = 1 ! endif ! ! ifdef UNIX_TOOLS ! CP = cp ! RM = rm ! MKDIR = mkdir ! else ! CP = copy ! RM = del ! MKDIR = md ! endif ! ! # -------- Set up mktext -------- ! ifdef UNIX_TOOLS ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! ! # -------- Give a sensible default target for make without any args. -------- ! # This must be done right after the tests, which can generate error targets. ! ! .PHONY: _default ! ! _default: default ! ! # -------- Decide what compiler options and libraries to use. -------- ! ! ifdef WARNMODE ! WFLAGS = -Wall -W -Werror ! else ! WFLAGS = -Wall -Wno-unused ! endif ! ! ifdef PGCC ! OFLAGS = -mcpu=pentium -O6 -ffast-math ! else ! ifdef PENTIUMONLY ! OFLAGS = -march=pentium -O2 -funroll-loops -ffast-math ! else ! OFLAGS = -mcpu=pentium -O2 -funroll-loops -ffast-math ! endif ! endif ! ! ifdef DEBUGMODE ! # debugging build ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -g ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) ! LFLAGS = -g3 ! LIB_FLAGS = -lcgui -lalld ! else ! ifdef PROFILEMODE ! # profiling build ! CFLAGS = $(WFLAGS) $(OFLAGS) -pg ! SFLAGS = $(WFLAGS) ! LFLAGS = -pg ! LIB_FLAGS = -lcgui -lallp ! else ! # optimised build ! CFLAGS = $(WFLAGS) $(OFLAGS) -fomit-frame-pointer -fno-strength-reduce ! SFLAGS = $(WFLAGS) ! ifndef SYMBOLMODE ! LFLAGS = -s ! LIB_FLAGS = -lcgui -lalleg ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! # This is just so that we can test that CCOM doesn't relies on Allegro ! # including some standard header. ! ifdef CCOM_NO_ALLEGRO_STD_HEADERS ! CFLAGS += -DALLEGRO_NO_STD_HEADERS -DEDOM=1 -DERANGE=1 ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! # -------- Define how to compile. -------- ! ! GCC2DJGPP = -DDJGPP=2 -U__unix__ ! ! define COMPILE_C_TO_OBJ ! gcc $(COMPILE_FLAGS) -I./include -o $@ -c $< ! endef ! ! define LINK_OBJ_TO_LIB ! ar rs $(LIB_NAME) $(LIB_OBJS) ! endef ! ! define LINK_OBJ_TO_EXE ! gcc $(LFLAGS) -o $@ $< $(LIB_NAME) $(LIB_FLAGS) ! endef ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifdef CROSSCOMPILE ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! mkdir $(subst \,/,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! cp $(subst \,/,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! cp $(subst \,/,$< $@) ! install-info $(subst \,/,$@) $(SYSTEM_INFO_DIR)/dir ! ! else # ifdef CROSSCOMPILE ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! $(MKDIR) $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! $(CP) $(subst /,\,$< $@) ! ! $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! $(CP) $(subst /,\,$< $@) ! ! endif # ifdef CROSSCOMPILE else ! ! ! INSTALL_HEADERS = $(addprefix $(DJGPPDIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(LIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) djgpp library has been installed. ! ! UNINSTALL_FILES = $(SYSTEM_LIB_DIR)/libccom.a $(SYSTEM_LIB_DIR)/libccomd.a \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INFO_DIR)/ccom$(INFO_SUFFIX) ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! ! ! # -------- Compile anything that can't be done in makefile.all. -------- ! ! # this section is empty ! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2DJGPP) -MM -MG -I. -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c $(wildcard docs/*.c src/misc/*.c) > _depend.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccom\/\1/" _depend.tmp > obj/djgpp/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\.o:\)/obj\/djgpp\/ccomd\/\1/" _depend.tmp > obj/djgpp/ccomd/makefile.dep ! rm _depend.tmp Index: makefile.vc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.vc,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** makefile.vc 23 May 2004 20:53:02 -0000 1.9 --- makefile.vc 21 Jun 2004 19:17:54 -0000 1.10 *************** *** 1,321 **** ! # makefile.vc: ! # Makefile for the CCOM library with MSVC. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # ! # To path MSVC so it can be used from the commandline, run the ! # vcvars32.bat file which can be found in your MSVC bin directory. ! # ! # This build uses djgpp for calculating ! # source dependencies, so you'll need to have that installed as well. ! # ! # The "depend" target uses sed. ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = MSVC ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/msvc ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\msvc ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/msvc ! LIB_DIR_D = $(LIB_ROOT_DIR)\msvc ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badmsvc badspaces ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(WINDIR) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef MSVCDIR ! MSVCDIR_U = $(subst \,/,$(MSVCDIR)) ! MSVCDIR_D = $(subst /,\,$(MSVCDIR)) ! else ! ifdef MSDEVDIR ! MSVCDIR_U = $(subst \,/,$(MSDEVDIR)) ! MSVCDIR_D = $(subst /,\,$(MSDEVDIR)) ! else ! badmsvc: ! @echo Your MSVCDIR or MSDEVDIR environment variable is not set! ! endif ! endif ! ! NULLSTRING := ! SPACE := $(NULLSTRING) # special magic to get an isolated space character ! ! ifneq ($(findstring $(SPACE),$(MSVCDIR)$(MSDEVDIR)),) ! badspaces: ! @echo There are spaces in your MSVCDIR or MSDEVDIR environment ! @echo variables: please change these to the 8.3 short filename ! @echo version, or move your compiler to a different directory. ! endif ! ! SYSTEM_INCLUDE_DIR = $(MSVCDIR_U)/include ! SYSTEM_INCLUDE_DIR_D = $(MSVCDIR_D)\include ! SYSTEM_LIB_DIR = $(MSVCDIR_U)/lib ! SYSTEM_LIB_DIR_D = $(MSVCDIR_D)\lib ! ! ifdef UNIX_TOOLS ! # -------- Set up mktext -------- ! ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ! ALLEGRO_DAT2C = $(subst \,/,$(ALLEGRO_DAT2C_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst \,/,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst \,/,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst \,/,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst \,/,$(MKTEXT_X)) ! else ! ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ! ALLEGRO_DAT2C = $(subst /,\,$(ALLEGRO_DAT2C_X)) ! CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) ! CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) ! CCOM_DAT_H = $(subst /,\,$(CCOM_DAT_H_X)) ! CCOM_LABELS = $(subst /,\,$(CCOM_LABELS_X)) ! TEXT_SOURCES = $(subst /,\,$(TEXT_SOURCES_X)) ! TEXT_HEADERS = $(subst /,\,$(TEXT_HEADERS_X)) ! MKTEXT = $(subst /,\,$(MKTEXT_X)) ! endif ! ! RUNNER = $(CGUIDIR)/obj/msvc/runner$(EXE_SUFFIX) ! ! .PHONY: _default ! ! _default: default ! ! # -------- decide what compiler options to use -------- ! ! ifdef WARNMODE ! WFLAGS = -W3 -WX ! else ! WFLAGS = -W1 ! endif ! ! ifdef DEBUGMODE ! # -------- debugging build -------- ! CFLAGS = -DDEBUGMODE=$(DEBUGMODE) $(WFLAGS) -Gd -Zi -MDd ! SFLAGS = -DDEBUGMODE=$(DEBUGMODE) -Wall ! LFLAGS = -debug -debugtype:cv ! ifdef STATICLINK ! LIB_FLAGS = cgui_s.lib alld_s.lib ! else ! LIB_FLAGS = cgui.lib alld.lib ! endif ! else ! ifdef PROFILEMODE ! # -------- profiling build -------- ! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD ! SFLAGS = -Wall ! LFLAGS = -profile ! ifdef STATICLINK ! LIB_FLAGS = cgui_s.lib allp_s.lib ! else ! LIB_FLAGS = cgui.lib allp.lib ! endif ! else ! # -------- optimised build -------- ! CFLAGS = $(WFLAGS) -Gd -Ox -GB -MD ! SFLAGS = -Wall ! LFLAGS = -release ! ifdef STATICLINK ! LIB_FLAGS = cgui_s.lib alleg_s.lib ! else ! LIB_FLAGS = cgui.lib alleg.lib ! endif ! endif ! endif ! ! ifdef CCOM_DEVELOPING ! CFLAGS += -D_CCOM_DEVELOPING=1 ! endif ! ifdef CCOM_FORTIFY ! CFLAGS += -D_CCOM_FORTIFY=1 -DFORTIFY ! endif ! ! CFLAGS_NO_OPTIMIZE = $(WFLAGS) -Gd -MT ! ! COMPILE_FLAGS = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS) ! COMPILE_FLAGS_NO_OPTIMIZE = $(subst src/,-DCCOM_SRC ,$(findstring src/, $<))$(CFLAGS_NO_OPTIMIZE) ! ! ifdef STATICLINK ! COMPILE_FLAGS += -DCCOM_STATICLINK -DCGUI_STATICLINK -DALLEGRO_STATICLINK ! endif ! ! LIB_FLAGS += kernel32.lib user32.lib gdi32.lib comdlg32.lib ole32.lib \ ! dinput.lib ddraw.lib dxguid.lib winmm.lib dsound.lib ! ! # -------- List platform specific objects and programs. -------- ! ! VPATH += ! ! OBJ_LIST = $(COMMON_OBJS) ! ! # Insert names of targets to build platform specific programs here. ! PROGRAMS = ! # Insert targets to build platform specific programs here. ! # myprogram: path/myprogram$(EXE_SUFFIX) ! ! ! # -------- Define how to compile. -------- ! ! GCC2MSVC = -D_MSC_VER -D_WIN32 -D_M_IX86 -U__GNUC__ -UDJGPP -U__unix__ ! ! define COMPILE_C_TO_OBJ ! $(RUNNER) cl @ -nologo $(COMPILE_FLAGS) -I./include -Fo$@ -c $< ! endef ! ! define LINK_OBJ_TO_EXE ! $(RUNNER) link @ -nologo $(LFLAGS) -subsystem:windows -out:$@ $< $(IMPLIB_NAME) $(LIB_FLAGS) ! endef ! ! ifdef STATICLINK ! # link as a static library ! define LINK_OBJ_TO_LIB ! $(RUNNER) lib @ -nologo -out:$(LIB_NAME) $(LIB_OBJS) ! endef ! else ! # link as a DLL ! define LINK_OBJ_TO_LIB ! $(RUNNER) link @ -nologo $(LFLAGS) -dll -def:$(EXPDEF_NAME) -out:$(DLL_NAME) -implib:$(IMPLIB_NAME) $(LIB_OBJS) $(LIB_FLAGS) ! endef ! endif # ifdef STATICLINK ! ! # -------- Rules for installing and removing the library files. -------- ! ! ifneq ($(wildcard $(DJDIR)/bin/cp.exe),) ! HAVE_CP = 1 ! endif ! ! ifndef STATICLINK ! $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! endif ! ! $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) ! ! $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! ifdef HAVE_CP ! $(DJDIR)/bin/cp $(subst \,/,$< $@) ! else ! copy $(subst /,\,$< $@) ! endif ! ! ! INSTALL_HEADERS = $(addprefix $(MSVCDIR_U)/,$(wildcard include/ccom/*.h)) ! ! INSTALL_FILES = $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME) \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(SYSTEM_INCLUDE_DIR)/ccom \ ! $(INSTALL_HEADERS) ! ! ifndef STATICLINK ! INSTALL_FILES += $(WINDIR_U)/$(DLL_BASENAME) ! endif ! ! install: $(INSTALL_FILES) ! @echo The $(DESCRIPTION) MSVC library has been installed. ! ! UNINSTALL_FILES = \ ! $(SYSTEM_LIB_DIR)/ccom.lib $(SYSTEM_LIB_DIR)/ccom_s.lib \ ! $(SYSTEM_LIB_DIR)/ccomd.lib $(SYSTEM_LIB_DIR)/ccomd_s.lib \ ! $(SYSTEM_INCLUDE_DIR)/ccom.h \ ! $(WINDIR_U)/ccom$(LIB_VERSION).dll $(WINDIR_U)/ccomd$(LIB_VERSION).dll ! ! uninstall: ! -rm -fv $(UNINSTALL_FILES) ! -rm -frv $(SYSTEM_INCLUDE_DIR)/ccom ! @echo All gone! ! ! # -------- Generate automatic dependencies. -------- ! ! DEPEND_PARAMS = $(GCC2MSVC) -MM -MG -I./include -DCCOM_SCAN_DEPEND ! ! depend: ! gcc $(DEPEND_PARAMS) src/*.c examples/*.c $(wildcard docs/*.c src/misc/*.c) > _depend.tmp ! sed -e "s/^[a-zA-Z0-9_\/]*\///" -e "s/[^ ]*version\.h//" -e "s/[^ ]*djgpp\.ver//" -e "s/[^ ]*allegro[^ ]*//g" -e"/^ *\\/d" _depend.tmp > _depend2.tmp ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccom\/\1\.obj:/" _depend2.tmp > obj/msvc/ccom/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccomd\/\1\.obj:/" _depend2.tmp > obj/msvc/ccomd/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccom_s\/\1\.obj:/" _depend2.tmp > obj/msvc/ccom_s/makefile.dep ! sed -e "s/^\([a-zA-Z0-9_]*\)\.o:/obj\/msvc\/ccomd_s\/\1\.obj:/" _depend2.tmp > obj/msvc/ccomd_s/makefile.dep ! rm _depend.tmp _depend2.tmp --- 1,318 ---- ! # makefile.vc: ! # Makefile for the CCOM library with MSVC. Should not be used directly! ! # ! # By Christer Sandberg (ported from Adime made by Sven Sandberg). ! # See readme.txt for more information about CCOM. ! # See makefile.all for a list of the available targets. ! # ! # ! # To path MSVC so it can be used from the commandline, run the ! # vcvars32.bat file which can be found in your MSVC bin directory. ! # ! # This build uses djgpp for calculating ! # source dependencies, so you'll need to have that installed as well. ! # ! # The "depend" target uses sed. ! ! # -------- define some variables that the primary makefile will use -------- ! ! PLATFORM = MSVC ! ! EXE_SUFFIX = .exe ! OBJ_SUFFIX = .obj ! LIB_SUFFIX = .lib ! HTML_SUFFIX = .html ! INFO_SUFFIX = .info ! TEXI_SUFFIX = .texi ! ! _TX_HTML_FLAG = -html ! _TX_TEXI_FLAG = -texi ! ! ifndef OBJ_ROOT_DIR ! OBJ_ROOT_DIR = obj ! OBJ_ROOT_DIR_D = obj ! endif ! OBJ_PLATFORM_ROOT_DIR = $(OBJ_ROOT_DIR)/msvc ! OBJ_PLATFORM_ROOT_DIR_D = $(OBJ_ROOT_DIR_D)\msvc ! ! ifndef LIB_ROOT_DIR ! LIB_ROOT_DIR = lib ! LIB_ROOT_DIR_D = lib ! endif ! LIB_DIR = $(LIB_ROOT_DIR)/msvc ! LIB_DIR_D = $(LIB_ROOT_DIR)\msvc ! ! ifdef STATICLINK ! # link as a static library ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE)_s ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE)_s ! IMPLIB_BASENAME = $(PACKAGE)_s$(LIB_SUFFIX) ! else ! # link as a DLL ! OBJ_DIR = $(OBJ_PLATFORM_ROOT_DIR)/$(PACKAGE) ! OBJ_DIR_D = $(OBJ_PLATFORM_ROOT_DIR_D)\$(PACKAGE) ! DLL_BASENAME = $(PACKAGE)$(LIB_VERSION).dll ! DLL_NAME = $(LIB_DIR)/$(DLL_BASENAME) ! IMPLIB_BASENAME = $(PACKAGE)$(LIB_SUFFIX) ! EXPDEF_NAME = $(LIB_DIR)/ccom.def ! endif ! ! IMPLIB_NAME = $(LIB_DIR)/$(IMPLIB_BASENAME) ! LIB_NAME = $(IMPLIB_NAME) ! ! # -------- Check that environment path variables are set. -------- ! ! .PHONY: badwin badmsvc badspaces ! ! ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 ! else ! WINSYSDIR = $(WINDIR) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system ! endif ! ! ifneq ($(WINSYSDIR),) ! WINDIR_U = $(subst \,/,$(WINSYSDIR)/$(WINSUBDIR)) ! WINDIR_D = $(subst /,\,$(WINSYSDIR)/$(WINSUBDIR)) ! else ! badwin: ! @echo Your SYSTEMROOT or windir environment variable is not set! ! endif ! ! ifdef MSVCDIR ! MSVCDIR_U = $(subst \,/,$(MSVCDIR)) ! MSVCDIR_D = $(subst /,\,$(MSVCDIR)) ! else ! ifdef MSDEVDIR ! MSVCDIR_U = $(subst \,/,$(MSDEVDIR)) ! MSVCDIR_D = $(subst /,\,$(MSDEVDIR)) ! else ! badmsvc: ! @echo Your MSVCDIR or MSDEVDIR environment variable is not set! ! endif ! endif ! ! NULLSTRING := ! SPACE := $(NULLSTRING) # special magic to get an isolated space character ! ! ifneq ($(findstring $(SPACE),$(MSVCDIR)$(MSDEVDIR)),) ! badspaces: ! @echo There are spaces in your MSVCDIR or MSDEVDIR environment ! @echo variables: please change these to the 8.3 short filename ! @echo version, or move your compiler to a different directory. ! endif ! ! SYSTEM_INCLUDE_DIR = $(MSVCDIR_U)/include !... [truncated message content] |
From: Christer S. <ch...@us...> - 2004-06-21 19:18:06
|
Update of /cvsroot/ccomx/ccom/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15985/docs Modified Files: ccom._tx readme._tx Log Message: fixed some build issues Index: readme._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/readme._tx,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** readme._tx 8 Feb 2004 20:47:21 -0000 1.4 --- readme._tx 21 Jun 2004 19:17:54 -0000 1.5 *************** *** 1,197 **** ! @# This is the source for the CCOM readme file, in Allegro's custom format. ! @# Read allegro/docs/makedoc.c for a description of what is going on... ! @# ! @#ignore_css ! @multiwordheaders ! @document_title=CCOM readme ! @rtfh=Readme file of CCOM ! @$\input texinfo ! @$@setfilename readme.inf ! @$@settitle Readme of CCOM ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$@setchapternewpage off ! @# This should remain commented at the moment (dvi output) @$@finalout ! @$ ! @$@ifinfo ! @$@direntry ! @$* Readme: (readme). Readme in CCOM ! @$@end direntry ! @$This is the Info version of the CCOM readme file. ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>Readme file of CCOM</title> ! @<body> ! <center><b>A CGUI and Allegro addon for serial port communication</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! Readme file of CCOM ! </b></center> ! @!text ! @heading ! Contents ! ! @shortcontents ! ! @text ! @heading ! Introduction ! ! CCOM is a library with functions for sending and receiving data via the ! serial ports, using the event queue of CGUI. It also provides a dialogue ! that lets the user modify the port settings. ! ! CCOM builds and operates on the following platforms: DOS/DJGPP, Linux, ! Windows/Mingw32 and Windows/MSVC. ! ! @heading ! Requirements ! ! You need to have compiled and installed Allegro version 4.0.x, as well as ! CGUI vesion 1.6.5 or later. ! There are also other requirements like correctly installed compilers etc. ! but these are already fulfilled if you succeded in making and installing ! Allegro and CGUI (no additional requirements are needed). ! ! You can find Allegro at: ! http://alleg.sourceforge.net/ ! ! You can find CGUI at: ! http://www.mdh.se/~csg/cgui/ ! ! ! @heading ! Installation ! ! Installation goes in five simple steps, and should be familiar since it is ! similar to the installation procedure as of Allegro and CGUI: ! <ul> ! <li> ! Tell the installation process what platform you use. Start a command window ! (shell) and set the main directory of CCOM to you current directory ! (i.e. enter the command > cd <the path to your CCOM directory>). Choose ! platform by running one of the following commands:<br> ! <pre> ! fix.bat djgpp - to compile with DOS/DJGPP ! fix.bat mingw32 - to compile with Windows/MinGW32 ! fix.bat msvc - to compile with Windows/MSVC ! ./fix.sh unix - to compile with Linux/gcc ! </pre> ! <li> ! Specify the path to your allegro installation by setting the environment ! variable ALLEGRO. E.g. if your allegro directory is c:\allegro then ! you must type <br> ! <pre> ! set ALLEGRO=c:\allegro ! </pre> ! or alternatively put that line into your autoexec file and restart. ! For unix users: ! <pre> ! export ALLEGRO=/home/user/allegro-4.0.3 ! </pre> ! or whatever is the name of your allegro directory. ! <li> ! Specify the path to your CGUI installation by setting the environment ! CGUIDIR the same way as ALLEGRO, e.g.<br> ! <pre> ! set CGUIDIR=c:\cgui ! </pre> ! <pre> ! export CGUIDIR=/home/user/cgui ! </pre> ! <li> ! Compile the library. This is done by running "make" at the command line. ! <li> ! Install the files to common directories. This is done by running ! "make install" at the command line.<br> ! Under Linux, you may want to instead run "make install SYSTEM_DIR=<dir>", ! which will cause headers to be installed to <dir>/include and libraries to ! <dir>/lib. (default for <dir> is /usr/local), or else you need to ! run make install as root. ! </ul> ! That's it! Now you are ready to run the example program in the example directory. ! <p> ! You may also want to perform some of the optional steps during the installation: ! <ul> ! <li> ! You can compile a debugging library by typing "make DEBUGMODE=1" instead of ! just "make" and "make install DEBUGMODE=1" instead of "make install". ! To compile both the usual and the debug library in one step, ! type "make all" and "make installall".<br> ! These debugging libraries require that you also have maked and installed ! the debugging versions of Allegro and CGUI. ! <li> ! If you want statically linked libraries under Unix or Windows as well as ! the default dynamically linked libraries (dll under Windows, .so under ! Unix), add "STATICLINK=1" to the make command like "make STATICLINK=1", ! or "make DEBUGMODE=1 STATICLINK=1" and also add it to the installation ! command.<br> ! These static libraries require that you also have maked and installed ! the static versions of Allegro and CGUI. ! <li> ! Users of the MSys environment needs to set teh environment vaariable ! UNIX_TOOLS to 1 before make install is run. ! <li> ! If you want to read the CCOM documentation with the Rhide online help ! system, go to the "Help / Syntax help / Files to search" menu in Rhide, ! and add "ccom" after the existing "libc" entry (separated by a space). ! <li> ! To use the ! To use the debugging library, link with libccomd.a instead of libccom.a. ! </ul> ! ! ! @heading ! Usage ! <ul><li> ! #include <ccom.h> in the top of each file that uses a function from ! the library. ! <li> ! Before calling any CCOM functions you must have initialized CGUI, Note! ! CGUI! For info about available functions, please read the manual, e.g. ! ccom.html (but the docs are also available in other formats). ! <li> ! If you link on the command line, link with '-lccom -lcgui -lalleg'. It is ! important that you specify the libraries in that order. If you want the ! ability to debug inside CCOM's functions, then link with '-lccomd' ! instead of '-lccom'. ! <p> ! On Linux you can use the following command to link with the default ! lib of CCOM (please note the ` ) ! <pre> ! gcc -s -lccom -lcgui `allegro-config --libs release --shared` file.o ! </pre> ! where `file' is the name of your file. <br> ! For debug libraries use -lccomd -lcguid instead and replace release ! with debug in the allegro config option. For linking a static application ! use -lccom_s and -lcgui_s and replace --shared with --static. ! <li> ! If you use the RHIDE environment, go to the menu Options/Libraries and ! fill in ccom. It is important that ccom is above cgui and allegro. Don't ! forget to check the box to the left of the library. You have to replace ! ccom with ccomd to include debugging information. ! <li> ! If you use some other environment, there is probably some options dialog ! where you can enter the libraries names (e.g. -lccom -lcgui -lalleg). ! </ul> ! ! ! @heading ! Contact Info ! ! Email:<ul> ! chr...@md... ! </ul> ! Homepage:<ul> ! http://www.idt.mdh.se/~csg/cgui/cguix ! </ul> ! Telephone:<ul> ! +46.(0)21.38.10.66 ! </ul> --- 1,216 ---- ! @# This is the source for the CCOM readme file, in Allegro's custom format. ! @# Read allegro/docs/makedoc.c for a description of what is going on... ! @# ! @#ignore_css ! @multiwordheaders ! @document_title=CCOM readme ! @rtfh=Readme file of CCOM ! @$\input texinfo ! @$@setfilename readme.inf ! @$@settitle Readme of CCOM ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$@setchapternewpage off ! @# This should remain commented at the moment (dvi output) @$@finalout ! @$ ! @$@ifinfo ! @$@direntry ! @$* Readme: (readme). Readme in CCOM ! @$@end direntry ! @$This is the Info version of the CCOM readme file. ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>Readme file of CCOM</title> ! @<body> ! <center><b>A CGUI and Allegro addon for serial port communication</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! Readme file of CCOM ! </b></center> ! @!text ! @heading ! Contents ! ! @shortcontents ! ! @text ! @heading ! Introduction ! ! CCOM is a library with functions for sending and receiving data via the ! serial ports, using the event queue of CGUI. It also provides a dialogue ! that lets the user modify the port settings. ! ! CCOM builds and operates on the following platforms: DOS/DJGPP, Linux, ! Windows/Mingw32 and Windows/MSVC. ! ! @heading ! Requirements ! ! You need to have compiled and installed Allegro version 4.0.x, as well as ! CGUI vesion 1.6.7 or later. ! There are also other requirements like correctly installed compilers etc. ! but these are already fulfilled if you succeded in making and installing ! Allegro and CGUI (no additional requirements are needed). ! ! You can find Allegro at: ! http://alleg.sourceforge.net/ ! ! You can find CGUI at: ! http://www.mdh.se/~csg/cgui/ ! ! ! @heading ! Installation ! ! Installation goes in some simple steps, and should be familiar since it is ! similar to the installation procedure as of Allegro and CGUI: ! <ul> ! <li> ! Tell the installation process what platform you use. Start a command window ! (shell) and set the main directory of CCOM to you current directory ! i.e. enter the command ! <pre> ! cd c:\cbar ! </pre> ! or whatever is the name of your ccom directory. Then choose platform by ! running one of the following commands: ! <pre> ! fix.bat djgpp - to compile with DOS/DJGPP ! fix.bat mingw32 - to compile with Windows/MinGW32 ! fix.bat msvc - to compile with Windows/MSVC ! ./fix.sh unix - to compile with Linux/gcc ! </pre> ! <li> ! Specify the path to your allegro installation by setting the environment ! variable ALLEGRO. E.g. if your allegro directory is c:\allegro then ! you must type <br> ! <pre> ! set ALLEGRO=c:\allegro ! </pre> ! or alternatively put that line into your autoexec file and restart. ! For unix users: ! <pre> ! export ALLEGRO=/home/user/allegro-4.0.3 ! </pre> ! or whatever is the name of your allegro directory. ! <li> ! Specify the path to your CGUI installation by setting the environment ! CGUIDIR the same way as ALLEGRO, e.g.<br> ! <pre> ! set CGUIDIR=c:\cgui ! </pre> ! <pre> ! export CGUIDIR=/home/user/cgui ! </pre> ! <li> ! Ensure that all CGUI's tools has been built: ! Make CGUI's directory to the current, e.g. type the command ! <pre> ! cd c:\cgui ! </pre> ! Build: ! <pre> ! make dat2c ! make mktext ! </pre> ! Return to the main directory of cbar, e.g.: ! <pre> ! cd c:\ccom ! </pre> ! <li> ! Compile the library. This is done by running "make" at the command line. ! <li> ! Install the files to common directories. This is done by running ! "make install" at the command line.<br> ! Under Linux, you may want to instead run "make install SYSTEM_DIR=<dir>", ! which will cause headers to be installed to <dir>/include and libraries to ! <dir>/lib. (default for <dir> is /usr/local), or else you need to ! run make install as root. ! </ul> ! That's it! Now you are ready to run the example program in the example directory. ! <p> ! You may also want to perform some of the optional steps during the installation: ! <ul> ! <li> ! You can compile a debugging library by typing "make DEBUGMODE=1" instead of ! just "make" and "make install DEBUGMODE=1" instead of "make install". ! To compile both the usual and the debug library in one step, ! type "make all" and "make installall".<br> ! These debugging libraries require that you also have maked and installed ! the debugging versions of Allegro and CGUI. ! <li> ! If you want statically linked libraries under Unix or Windows as well as ! the default dynamically linked libraries (dll under Windows, .so under ! Unix), add "STATICLINK=1" to the make command like "make STATICLINK=1", ! or "make DEBUGMODE=1 STATICLINK=1" and also add it to the installation ! command.<br> ! These static libraries require that you also have maked and installed ! the static versions of Allegro and CGUI. ! <li> ! Users of the MSys environment needs to set teh environment vaariable ! UNIX_TOOLS to 1 before make install is run. ! <li> ! If you want to read the CCOM documentation with the Rhide online help ! system, go to the "Help / Syntax help / Files to search" menu in Rhide, ! and add "ccom" after the existing "libc" entry (separated by a space). ! <li> ! To use the ! To use the debugging library, link with libccomd.a instead of libccom.a. ! </ul> ! ! ! @heading ! Usage ! <ul><li> ! #include <ccom.h> in the top of each file that uses a function from ! the library. ! <li> ! Before calling any CCOM functions you must have initialized CGUI, Note! ! CGUI! For info about available functions, please read the manual, e.g. ! ccom.html (but the docs are also available in other formats). ! <li> ! If you link on the command line, link with '-lccom -lcgui -lalleg'. It is ! important that you specify the libraries in that order. If you want the ! ability to debug inside CCOM's functions, then link with '-lccomd' ! instead of '-lccom'. ! <p> ! On Linux you can use the following command to link with the default ! lib of CCOM (please note the ` ) ! <pre> ! gcc -s -lccom -lcgui `allegro-config --libs release --shared` file.o ! </pre> ! where `file' is the name of your file. <br> ! For debug libraries use -lccomd -lcguid instead and replace release ! with debug in the allegro config option. For linking a static application ! use -lccom_s and -lcgui_s and replace --shared with --static. ! <li> ! If you use the RHIDE environment, go to the menu Options/Libraries and ! fill in ccom. It is important that ccom is above cgui and allegro. Don't ! forget to check the box to the left of the library. You have to replace ! ccom with ccomd to include debugging information. ! <li> ! If you use some other environment, there is probably some options dialog ! where you can enter the libraries names (e.g. -lccom -lcgui -lalleg). ! </ul> ! ! ! @heading ! Contact Info ! ! Email:<ul> ! chr...@md... ! </ul> ! Homepage:<ul> ! http://www.idt.mdh.se/~csg/cgui/cguix ! </ul> ! Telephone:<ul> ! +46.(0)21.38.10.66 ! </ul> Index: ccom._tx =================================================================== RCS file: /cvsroot/ccomx/ccom/docs/ccom._tx,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** ccom._tx 8 Feb 2004 20:47:21 -0000 1.5 --- ccom._tx 21 Jun 2004 19:17:54 -0000 1.6 *************** *** 1,238 **** ! @#This is the source for the CCOM manual, in Shawn's special format. ! @#The readable documents are generated and will be found in the files: ! @#ccom.txt,ccom.rtf, ccom.htm, ccom.inf, the latter may be ! @#installed as on-line help if you are using rhide (just add cbarcode to the ! @#list of help files) ! @# ! @multiwordheaders ! @manh="version 1.0.0" "CCOM" "Manual" ! @document_title=CCOM Manual ! @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports ! @$\input texinfo ! @$@setfilename ccom.inf ! @$@settitle CCOM Manual ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$ ! @$@ifinfo ! @$This is the Info version of the CCOM manual ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>The CCOM API</title> ! @<body> ! <center><b>CCOM</b></center> ! <center><b>A CGUI and Allegro addon Communication package</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! The Manual of CCOM 1.0.0 ! </b></center> ! @!text ! ! @heading ! Contents ! ! @contents ! ! @text ! @heading ! Using CCOM ! @xref Simple use of COM ports ! @xref Direct_port_setting ! To be able to call the functions in the CCOM lib you must first build and ! install the lib and then #include <ccom.h> in your C file(s). You must ! also link to the lib libcgui.a (or use the dynamic linked module). When ! you run your program you must also ensure that the text labels for the ! dialogue rea present (don't forget this when you distribute your program ! to other people!). You can find that file in the examples directory of ! CCOM. ! ! @heading ! Simple use of COM ports ! @xref Direct_port_setting ! A "serial port" is a chip in the computer with two sides, one "speaking" to ! the CPU (i.e. your program), the other sending data to and receiving data ! from some device connected to the plug at the back of the computer. ! The transmission of data on the line can be done in different manners, ! the sender and receiver must always agree on which manner. The current ! hardware is not able to do anything like "auto-detection". Therefore ! the port must be informed how to transmit data to and from the ! currently connected device. These "port settings" must be set from the "CPU ! side" of the port, i.e. your program must do it. Only the end user of your ! program knows what device that is connected to his or her computer for the ! moment. Therefore the task is quite simple for you: Provide the end-user ! with some kind of dialogue to enter the port settings. When the settings has ! been chosen the port must be informed about these settings. <br> ! The major tasks for CCOM are: ! <ul> ! <li> provide such a dialogue ! <li> hide details about how to tell the port about these settings ! <li> hide details about how to send and receive data ! </ul> ! To send data you just call the send-function. To be able to receive data ! you need to call another function to "register" a call-back (a pointer to ! some function that you have written) that will be called as soon as some ! data has reached the port from the outside world.<br> ! ! @@int @CcomSettingsDialogue(int portnr); ! Starts a dialogue which let the user modify the port settings. If the ! user confirms the changes made (by closing the dialogue with ! "OK"), the new settings will immediately be applied to the hardware and ! also stored into the config-file. <br> ! Parameter: ! <ul> ! <li> portnr: the port number (CCOM_COM1, CCOM_COM2, CCOM_COM3, CCOM_COM4) to ! modify settings for. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomSendBuffer(int portnr, const char *buffer, int n, void (*Notify) (int portnr, void *data), void *data); ! Starts the sending of the buffer `buffer' to port `portnr'. ! If the previous buffer(s) has not yet been sent, `CcomSendBuffer' will ! enque the new buffer. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file.<br> ! <ul> ! <li> portnr: The port number (CCOM_COM*) to send the buffer to ! <li> buffer: The data to send. A copy of `buffer' will be made so ! you are free to destroy your calling buffer. ! <li> n: The number of bytes to send. ! <li> Notify: (optional) A pointer to a function of yours, that will ! be called when the buffer has been successfully sent. If you don't ! need any notification, just pass NULL.<br> ! `Notify' is associated with the current buffer only so, if you want, ! you may alter both the call-back and data-pointer between different ! buffers. ! Parameters to `Notify': ! <ul> ! <li> portnr: The port that the data was sent on. ! <li> data: The pointer `data' passed to `CcomSendBuffer'. ! </ul> ! <li> data: A pointer to some data that will be passed to `Notify', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStartScanning(int portnr, int options, void (*CallBack) (int portnr, int readdata, int error, void *data), void *data); ! Starts to check the port `portno' for bytes. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file. ! <ul> ! <li> portnr: The port number (CCOM_COM*) to receive bytes from. ! <li> CallBack: A pointer to a function of yours that will ! be called as soon as a byte has been received. <br> ! Parameters to `CallBack': ! <ul> ! <li> portnr: The port where the data was received ! <li> options: Currently not used. ! <li> readdata: The the low-order byte of `readdata' contains ! the byte read from the port. ! <li> error: If a transmission error was detected, then this ! error code will be passed in `error'. The possible errors are: ! <ul> ! <li> CCOM_ERR_ORUN - Overrun, may occure if polling is used and ! the progam is not fast enough to check the port. ! <li> CCOM_ERR_PAR - Parity error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! <li> CCOM_ERR_FRAME - Frame error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! </ul> ! <li> data: The pointer `data' passed to `CcomStartScanning'. ! </ul> ! <li> data: A pointer to some data that will be passed to `CallBack', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStopSending(int portno) ! Normally you don't need to use this function. `CcomStopSending' will stop ! the sending. Buffers that are unsent (partially or completetly) ! will be dropped. ! Returns 1 if successful else 0. ! ! @@int @CcomStopScanning(int portno); ! Normally you don't need to use this function. `CcomStopScanning' will stop ! scanning (checking the port for incoming data). ! Returns 1 if successful else 0. ! ! @@void @CcomSetPath(const char *path); ! It's not necessary to use this function. The dialogue will look for the ! file with textlabels in the current directory (i.e. it will try to open ! "ccomlabl.txt"). I you prefere locating that file somewhere else you can ! can use `CcomSetPath' to specify that path. The path must include also the ! file name. The path may lead to somewhere in a datafile if you use the ! '#' delimiter after the data-file name (as usual). ! In the distribution of CCOM the text-file is located in the examples ! directory. It can be re-built by use of the `mktext' tool of CGUI (see ! the tools directory of CGUI for details about the tool). Enter the ! command `make texts CGUIDIR=<path>' where <path> is the path to your ! CGUI directory. To add labels of your favorite language to the label file ! do these additions into file src/*.t and re-build. If you do it, it would ! also be fine if you send me the changes so I can add them to next release! ! ! @heading ! Direct_port_setting ! @xref Simple use of COM ports ! If you for some reason don't like the dialogue for port settings, you can ! make your own and instead use the direct port setting functions.<br> ! In some cases you may want to do a program for computer-computer ! communication, then it may in some cases be meaningful to hard-code the ! port settings, in which case the direct port setting functions can be used. ! In most cases it will however not be meaningful to hard-code the settings of ! the port. ! ! @@int @CcomSetBaud(int portno, long baud_rate); ! Normally you dont need to call this function. ! Modifies the port setting concerning the transmission speed. If you call ! this function you must call it after the first call to `CcomStartScanning' ! or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetBits(int portno, int nrbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning number of bits in each byte. `nrbits' ! can range from 5 to 8. If you use this function you must call it after ! the first call to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetStopBits(int portno, int stopbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning stopbits. `stopbits' can be either 1 ! or 2. If you use this function you must call it after the first call ! to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParity(int portno, int parity); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity. If `parity' is ! 1 the parity check will be "even", if 0 odd. If you use this function ! you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParityEnable(int portno, int parityenable); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity enable. If `parityenable' is ! 1 the parity check will be enabled, if 0 disabled. If you use this ! function you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @headingnocontent ! Index ! ! @index ! ! @$@contents ! @$@bye ! ! @html ! @text --- 1,238 ---- ! @#This is the source for the CCOM manual, in Shawn's special format. ! @#The readable documents are generated and will be found in the files: ! @#ccom.txt,ccom.rtf, ccom.htm, ccom.inf, the latter may be ! @#installed as on-line help if you are using rhide (just add cbarcode to the ! @#list of help files) ! @# ! @multiwordheaders ! @manh="version 0.9.2" "CCOM" "Manual" ! @document_title=CCOM Manual ! @rtfh=CCOM - an add on lib to CGUI for accessing the serial ports ! @$\input texinfo ! @$@setfilename ccom.inf ! @$@settitle CCOM Manual ! @$@setchapternewpage odd ! @$@paragraphindent 0 ! @$ ! @$@ifinfo ! @$This is the Info version of the CCOM manual ! @$ ! @$By Christer Sandberg and Rasmus Myklebust ! @$@end ifinfo ! @$ ! @$@node Top, , (dir), (dir) ! @<html> ! @<head> ! @<title>The CCOM API</title> ! @<body> ! <center><b>CCOM</b></center> ! <center><b>A CGUI and Allegro addon Communication package</b></center> ! <center><b>by Christer Sandberg and Rasmus Myklebust</b></center> ! <center>Email: <email>chr...@md...</a></center> ! <center>Homepage: <a href="http://www.idt.mdh.se/~csg/cgui/cguix">http://www.idt.mdh.se/~csg/cgui/cguix</a></center> ! <center><b> ! The Manual of CCOM 0.9.2 ! </b></center> ! @!text ! ! @heading ! Contents ! ! @contents ! ! @text ! @heading ! Using CCOM ! @xref Simple use of COM ports ! @xref Direct_port_setting ! To be able to call the functions in the CCOM lib you must first build and ! install the lib and then #include <ccom.h> in your C file(s). You must ! also link to the lib libcgui.a (or use the dynamic linked module). When ! you run your program you must also ensure that the text labels for the ! dialogue rea present (don't forget this when you distribute your program ! to other people!). You can find that file in the examples directory of ! CCOM. ! ! @heading ! Simple use of COM ports ! @xref Direct_port_setting ! A "serial port" is a chip in the computer with two sides, one "speaking" to ! the CPU (i.e. your program), the other sending data to and receiving data ! from some device connected to the plug at the back of the computer. ! The transmission of data on the line can be done in different manners, ! the sender and receiver must always agree on which manner. The current ! hardware is not able to do anything like "auto-detection". Therefore ! the port must be informed how to transmit data to and from the ! currently connected device. These "port settings" must be set from the "CPU ! side" of the port, i.e. your program must do it. Only the end user of your ! program knows what device that is connected to his or her computer for the ! moment. Therefore the task is quite simple for you: Provide the end-user ! with some kind of dialogue to enter the port settings. When the settings has ! been chosen the port must be informed about these settings. <br> ! The major tasks for CCOM are: ! <ul> ! <li> provide such a dialogue ! <li> hide details about how to tell the port about these settings ! <li> hide details about how to send and receive data ! </ul> ! To send data you just call the send-function. To be able to receive data ! you need to call another function to "register" a call-back (a pointer to ! some function that you have written) that will be called as soon as some ! data has reached the port from the outside world.<br> ! ! @@int @CcomSettingsDialogue(int portnr); ! Starts a dialogue which let the user modify the port settings. If the ! user confirms the changes made (by closing the dialogue with ! "OK"), the new settings will immediately be applied to the hardware and ! also stored into the config-file. <br> ! Parameter: ! <ul> ! <li> portnr: the port number (CCOM_COM1, CCOM_COM2, CCOM_COM3, CCOM_COM4) to ! modify settings for. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomSendBuffer(int portnr, const char *buffer, int n, void (*Notify) (int portnr, void *data), void *data); ! Starts the sending of the buffer `buffer' to port `portnr'. ! If the previous buffer(s) has not yet been sent, `CcomSendBuffer' will ! enque the new buffer. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file.<br> ! <ul> ! <li> portnr: The port number (CCOM_COM*) to send the buffer to ! <li> buffer: The data to send. A copy of `buffer' will be made so ! you are free to destroy your calling buffer. ! <li> n: The number of bytes to send. ! <li> Notify: (optional) A pointer to a function of yours, that will ! be called when the buffer has been successfully sent. If you don't ! need any notification, just pass NULL.<br> ! `Notify' is associated with the current buffer only so, if you want, ! you may alter both the call-back and data-pointer between different ! buffers. ! Parameters to `Notify': ! <ul> ! <li> portnr: The port that the data was sent on. ! <li> data: The pointer `data' passed to `CcomSendBuffer'. ! </ul> ! <li> data: A pointer to some data that will be passed to `Notify', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStartScanning(int portnr, int options, void (*CallBack) (int portnr, int readdata, int error, void *data), void *data); ! Starts to check the port `portno' for bytes. The first time ! `CcomStartScanning' or `CcomSendBuffer' is called for a certain port the ! port settings will be loaded from the current config file. ! <ul> ! <li> portnr: The port number (CCOM_COM*) to receive bytes from. ! <li> CallBack: A pointer to a function of yours that will ! be called as soon as a byte has been received. <br> ! Parameters to `CallBack': ! <ul> ! <li> portnr: The port where the data was received ! <li> options: Currently not used. ! <li> readdata: The the low-order byte of `readdata' contains ! the byte read from the port. ! <li> error: If a transmission error was detected, then this ! error code will be passed in `error'. The possible errors are: ! <ul> ! <li> CCOM_ERR_ORUN - Overrun, may occure if polling is used and ! the progam is not fast enough to check the port. ! <li> CCOM_ERR_PAR - Parity error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! <li> CCOM_ERR_FRAME - Frame error, may occure if there is a bad ! line or the port settings is not the same on receiving ! computer and the sending device. ! </ul> ! <li> data: The pointer `data' passed to `CcomStartScanning'. ! </ul> ! <li> data: A pointer to some data that will be passed to `CallBack', pass ! NULL if you don't need it. ! </ul> ! Returns 1 if successful else 0. ! ! @@int @CcomStopSending(int portno) ! Normally you don't need to use this function. `CcomStopSending' will stop ! the sending. Buffers that are unsent (partially or completetly) ! will be dropped. ! Returns 1 if successful else 0. ! ! @@int @CcomStopScanning(int portno); ! Normally you don't need to use this function. `CcomStopScanning' will stop ! scanning (checking the port for incoming data). ! Returns 1 if successful else 0. ! ! @@void @CcomSetPath(const char *path); ! It's not necessary to use this function. The dialogue will look for the ! file with textlabels in the current directory (i.e. it will try to open ! "ccomlabl.txt"). I you prefere locating that file somewhere else you can ! can use `CcomSetPath' to specify that path. The path must include also the ! file name. The path may lead to somewhere in a datafile if you use the ! '#' delimiter after the data-file name (as usual). ! In the distribution of CCOM the text-file is located in the examples ! directory. It can be re-built by use of the `mktext' tool of CGUI (see ! the tools directory of CGUI for details about the tool). Enter the ! command `make texts CGUIDIR=<path>' where <path> is the path to your ! CGUI directory. To add labels of your favorite language to the label file ! do these additions into file src/*.t and re-build. If you do it, it would ! also be fine if you send me the changes so I can add them to next release! ! ! @heading ! Direct_port_setting ! @xref Simple use of COM ports ! If you for some reason don't like the dialogue for port settings, you can ! make your own and instead use the direct port setting functions.<br> ! In some cases you may want to do a program for computer-computer ! communication, then it may in some cases be meaningful to hard-code the ! port settings, in which case the direct port setting functions can be used. ! In most cases it will however not be meaningful to hard-code the settings of ! the port. ! ! @@int @CcomSetBaud(int portno, long baud_rate); ! Normally you dont need to call this function. ! Modifies the port setting concerning the transmission speed. If you call ! this function you must call it after the first call to `CcomStartScanning' ! or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetBits(int portno, int nrbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning number of bits in each byte. `nrbits' ! can range from 5 to 8. If you use this function you must call it after ! the first call to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetStopBits(int portno, int stopbits); ! Normally you dont need to call this function. ! Modifies the port setting concerning stopbits. `stopbits' can be either 1 ! or 2. If you use this function you must call it after the first call ! to `CcomStartScanning' or `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParity(int portno, int parity); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity. If `parity' is ! 1 the parity check will be "even", if 0 odd. If you use this function ! you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @@int @CcomSetParityEnable(int portno, int parityenable); ! Normally you dont need to call this function. ! Modifies the port setting concerning parity enable. If `parityenable' is ! 1 the parity check will be enabled, if 0 disabled. If you use this ! function you must call it after the first call to `CcomStartScanning' or ! `CcomSendBuffer'. ! Returns 1 if successful else 0. ! ! @headingnocontent ! Index ! ! @index ! ! @$@contents ! @$@bye ! ! @html ! @text |
From: Christer S. <ch...@us...> - 2004-06-21 19:18:04
|
Update of /cvsroot/ccomx/ccom/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15985/include Modified Files: ccom.h Log Message: fixed some build issues Index: ccom.h =================================================================== RCS file: /cvsroot/ccomx/ccom/include/ccom.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ccom.h 8 Feb 2004 20:47:21 -0000 1.6 --- ccom.h 21 Jun 2004 19:17:54 -0000 1.7 *************** *** 1,37 **** ! #ifndef CCOM_H ! #define CCOM_H ! ! #define CCOM_VERSION_MAJOR 1 ! #define CCOM_VERSION_MINOR 0 ! #define CCOM_VERSION_PATCH 0 ! #define CCOM_VERSION_STRING "1.0.0" ! #define CCOM_DATE 20040208 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Feb 08, 2004" ! ! #include "ccom/ccomcfg.h" ! ! #define CCOM_COM1 0 ! #define CCOM_COM2 1 ! #define CCOM_COM3 2 ! #define CCOM_COM4 3 ! ! #define CCOM_ERR_ORUN (1 << 0) ! #define CCOM_ERR_PAR (1 << 1) ! #define CCOM_ERR_FRAME (1 << 2) ! ! CCOM_FUNC(int, CcomSettingsDialogue, (int portno)); ! CCOM_FUNC(int, CcomSendBuffer, (int portnr, const char *buffer, int n, CCOM_METHOD(void, Notify, (int portnr, void *data)), void *data)); ! CCOM_FUNC(int, CcomStartScanning, (int portnr, int options, CCOM_METHOD(void, CallBack, (int portnr, int readdata, int error, void *data)), void *data)); ! CCOM_FUNC(void, CcomSetPath, (const char *path)); ! ! CCOM_FUNC(int, CcomStopSending, (int portno)); ! CCOM_FUNC(int, CcomStopScanning, (int portno)); ! ! CCOM_FUNC(int, CcomSetBaud, (int portno, long baud_rate)); ! CCOM_FUNC(int, CcomSetBits, (int portno, int nobits)); ! CCOM_FUNC(int, CcomSetStopBits, (int portno, int stopbits)); ! CCOM_FUNC(int, CcomSetParity, (int portno, int parity)); ! CCOM_FUNC(int, CcomSetParityEnable, (int portno, int parityenable)); ! CCOM_FUNC(void, CcomLoopBackMode, (int portno, int mode)); ! ! #endif --- 1,37 ---- ! #ifndef CCOM_H ! #define CCOM_H ! ! #define CCOM_VERSION_MAJOR 0 ! #define CCOM_VERSION_MINOR 9 ! #define CCOM_VERSION_PATCH 2 ! #define CCOM_VERSION_STRING "0.9.2" ! #define CCOM_DATE 20040611 /* yyyymmdd */ ! #define CCOM_DATE_STRING "Jun 11, 2004" ! ! #include "ccom/ccomcfg.h" ! ! #define CCOM_COM1 0 ! #define CCOM_COM2 1 ! #define CCOM_COM3 2 ! #define CCOM_COM4 3 ! ! #define CCOM_ERR_ORUN (1 << 0) ! #define CCOM_ERR_PAR (1 << 1) ! #define CCOM_ERR_FRAME (1 << 2) ! ! CCOM_FUNC(int, CcomSettingsDialogue, (int portno)); ! CCOM_FUNC(int, CcomSendBuffer, (int portnr, const char *buffer, int n, CCOM_METHOD(void, Notify, (int portnr, void *data)), void *data)); ! CCOM_FUNC(int, CcomStartScanning, (int portnr, int options, CCOM_METHOD(void, CallBack, (int portnr, int readdata, int error, void *data)), void *data)); ! CCOM_FUNC(void, CcomSetPath, (const char *path)); ! ! CCOM_FUNC(int, CcomStopSending, (int portno)); ! CCOM_FUNC(int, CcomStopScanning, (int portno)); ! ! CCOM_FUNC(int, CcomSetBaud, (int portno, long baud_rate)); ! CCOM_FUNC(int, CcomSetBits, (int portno, int nobits)); ! CCOM_FUNC(int, CcomSetStopBits, (int portno, int stopbits)); ! CCOM_FUNC(int, CcomSetParity, (int portno, int parity)); ! CCOM_FUNC(int, CcomSetParityEnable, (int portno, int parityenable)); ! CCOM_FUNC(void, CcomLoopBackMode, (int portno, int mode)); ! ! #endif |
From: <ben...@id...> - 2004-05-25 08:16:10
|
Dear Open Source developer I am doing a research project on "Fun and Software Development" in which I kindly invite you to participate. You will find the online survey under http://fasd.ethz.ch/qsf/. The questionnaire consists of 53 questions and you will need about 15 minutes to complete it. With the FASD project (Fun and Software Development) we want to define the motivational significance of fun when software developers decide to engage in Open Source projects. What is special about our research project is that a similar survey is planned with software developers in commercial firms. This procedure allows the immediate comparison between the involved individuals and the conditions of production of these two development models. Thus we hope to obtain substantial new insights to the phenomenon of Open Source Development. With many thanks for your participation, Benno Luthiger PS: The results of the survey will be published under http://www.isu.unizh.ch/fuehrung/blprojects/FASD/. We have set up the mailing list fa...@we... for this study. Please see http://fasd.ethz.ch/qsf/mailinglist_en.html for registration to this mailing list. _______________________________________________________________________ Benno Luthiger Swiss Federal Institute of Technology Zurich 8092 Zurich Mail: benno.luthiger(at)id.ethz.ch _______________________________________________________________________ |
From: Rasmus M. <ras...@us...> - 2004-05-24 00:23:32
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28395/misc Modified Files: makefile.dj makefile.mgw Log Message: Fixed the use of UNIX_TOOLS if present Index: makefile.mgw =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.mgw,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** makefile.mgw 23 May 2004 20:53:01 -0000 1.5 --- makefile.mgw 24 May 2004 00:23:20 -0000 1.6 *************** *** 97,100 **** --- 97,114 ---- SYSTEM_LIB_DIR_D = $(MINGDIR_D)\lib + ifneq (,$(findstring /sh.exe,$(SHELL))) + UNIX_TOOLS = 1 + endif + + ifdef UNIX_TOOLS + CP = cp + RM = rm + MKDIR = mkdir + else + CP = copy + RM = del + MKDIR = md + endif + # -------- Set up mktext -------- ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) *************** *** 275,292 **** ifndef STATICLINK $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! copy $(subst /,\,$< $@) endif $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! copy $(subst /,\,$< $@) $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! copy $(subst /,\,$< $@) $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! copy $(subst /,\,$< $@) endif # ifdef CROSSCOMPILE else --- 289,306 ---- ifndef STATICLINK $(WINDIR_U)/$(DLL_BASENAME): $(DLL_NAME) ! $(CP) $(subst /,\,$< $@) endif $(SYSTEM_LIB_DIR)/$(IMPLIB_BASENAME): $(IMPLIB_NAME) ! $(CP) $(subst /,\,$< $@) $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! $(CP) $(subst /,\,$< $@) $(SYSTEM_INCLUDE_DIR)/ccom: ! $(MKDIR) $(subst /,\,$@) $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! $(CP) $(subst /,\,$< $@) endif # ifdef CROSSCOMPILE else Index: makefile.dj =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.dj,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** makefile.dj 8 Feb 2004 20:47:22 -0000 1.3 --- makefile.dj 24 May 2004 00:23:20 -0000 1.4 *************** *** 70,73 **** --- 70,86 ---- SYSTEM_INFO_DIR = $(DJGPPDIR_D)\info + ifneq (,$(findstring /sh.exe,$(SHELL))) + UNIX_TOOLS = 1 + endif + + ifdef UNIX_TOOLS + CP = cp + RM = rm + MKDIR = mkdir + else + CP = copy + RM = del + MKDIR = md + endif # -------- Set up mktext -------- ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) *************** *** 199,215 **** $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! copy $(subst /,\,$< $@) $(SYSTEM_INCLUDE_DIR)/ccom: ! md $(subst /,\,$@) $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! copy $(subst /,\,$< $@) $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! copy $(subst /,\,$< $@) $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! copy $(subst /,\,$< $@) endif # ifdef CROSSCOMPILE else --- 212,228 ---- $(SYSTEM_INCLUDE_DIR)/ccom.h: include/ccom.h ! $(CP) $(subst /,\,$< $@) $(SYSTEM_INCLUDE_DIR)/ccom: ! $(MKDIR) $(subst /,\,$@) $(SYSTEM_INCLUDE_DIR)/ccom/%.h: include/ccom/%.h include/ccom ! $(CP) $(subst /,\,$< $@) $(SYSTEM_INFO_DIR)/%$(INFO_SUFFIX): docs/%$(INFO_SUFFIX) ! $(CP) $(subst /,\,$< $@) $(SYSTEM_LIB_DIR)/$(LIB_BASENAME): $(LIB_NAME) ! $(CP) $(subst /,\,$< $@) endif # ifdef CROSSCOMPILE else |
From: Rasmus M. <ras...@us...> - 2004-05-23 20:53:11
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14759 Modified Files: makefile.mgw makefile.vc Log Message: Fixed reading of $(SystemRoot) and $(SYSTEMROOT) Index: makefile.vc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.vc,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** makefile.vc 27 Feb 2004 23:48:23 -0000 1.8 --- makefile.vc 23 May 2004 20:53:02 -0000 1.9 *************** *** 66,82 **** ifeq ($(OS),Windows_NT) ! ifeq ($(TERM),msys) ! WINSYSDIR = $(SYSTEMROOT) ! else ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 else ! ifeq ($(TERM),msys) ! WINSYSDIR = $(WINDIR) ! else ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system endif --- 66,80 ---- ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 else ! WINSYSDIR = $(WINDIR) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system endif Index: makefile.mgw =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.mgw,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** makefile.mgw 8 Feb 2004 20:47:22 -0000 1.4 --- makefile.mgw 23 May 2004 20:53:01 -0000 1.5 *************** *** 59,75 **** ifeq ($(OS),Windows_NT) ! ifeq ($(TERM),msys) ! WINSYSDIR = $(SYSTEMROOT) ! else ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 else ! ifeq ($(TERM),msys) ! WINSYSDIR = $(WINDIR) ! else ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system endif --- 59,73 ---- ifeq ($(OS),Windows_NT) ! WINSYSDIR = $(SYSTEMROOT) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(SystemRoot) ! endif ! WINSUBDIR = system32 else ! WINSYSDIR = $(WINDIR) ! ifeq ($(WINSYSDIR),) ! WINSYSDIR = $(windir) ! endif ! WINSUBDIR = system endif |
From: Rasmus M. <ras...@us...> - 2004-05-23 20:52:38
|
Update of /cvsroot/ccomx/ccom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14595 Modified Files: fix.bat Log Message: Line ends Index: fix.bat =================================================================== RCS file: /cvsroot/ccomx/ccom/fix.bat,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** fix.bat 2 Mar 2003 17:05:59 -0000 1.1.1.1 --- fix.bat 23 May 2004 20:52:22 -0000 1.2 *************** *** 1,90 **** ! @echo off ! ! rem Sets up the CCOM package for building with the specified compiler, ! rem and if possible converting text files from LF to CR/LF format. ! ! ! rem check that number of args is ok ! if [%3] == [] goto arg2 ! goto help ! ! ! rem check if second arg is ok ! :arg2 ! if [%2] == [--quick] goto arg1 ! if [%2] == [] goto arg1 ! goto help ! ! ! rem check if first arg is ok ! :arg1 ! if [%1] == [bcc32] goto begin ! if [%1] == [djgpp] goto begin ! if [%1] == [mingw32] goto begin ! if [%1] == [msvc] goto begin ! goto help ! ! ! rem echo header to makefile, then goto platform specific section ! :begin ! echo # generated by fix.bat > makefile ! if [%1] == [bcc32] goto bcc32 ! if [%1] == [djgpp] goto djgpp ! if [%1] == [mingw32] goto mingw32 ! if [%1] == [msvc] goto msvc ! echo internal error: not reached ! goto end ! ! ! :bcc32 ! echo Configuring CCOM for Windows/BCC32... ! echo MAKEFILE_INC = makefile.bcc >> makefile ! goto finish ! ! ! :djgpp ! echo Configuring CCOM for DOS/djgpp... ! echo MAKEFILE_INC = makefile.dj >> makefile ! goto finish ! ! ! :mingw32 ! echo Configuring CCOM for Windows/Mingw32... ! echo MAKEFILE_INC = makefile.mgw >> makefile ! goto finish ! ! ! :msvc ! echo Configuring CCOM for Windows/MSVC... ! echo MAKEFILE_INC = makefile.vc >> makefile ! goto finish ! ! ! :help ! echo. ! echo Usage: fix platform [--quick] ! echo. ! echo Where platform is one of: djgpp, mingw32, msvc or bcc32. ! echo The --quick parameter is used to turn off LF to CR/LF conversion. ! echo. ! goto end ! ! ! rem write end of makefile and possibly convert end of line format ! :finish ! echo include misc/makefile.all >> makefile ! ! if [%2] == [--quick] goto done ! if [%1] == [bcc32] goto done ! if [%1] == [mingw32] goto done ! ! echo Converting CCOM files to DOS CR/LF format... ! utod *.bat .../*.c .../*.h ! utod .../*.txt .../*._tx makefile* misc/makefile.* readme.* ! ! ! :done ! echo Done! ! ! ! :end --- 1,90 ---- ! @echo off ! ! rem Sets up the CCOM package for building with the specified compiler, ! rem and if possible converting text files from LF to CR/LF format. ! ! ! rem check that number of args is ok ! if [%3] == [] goto arg2 ! goto help ! ! ! rem check if second arg is ok ! :arg2 ! if [%2] == [--quick] goto arg1 ! if [%2] == [] goto arg1 ! goto help ! ! ! rem check if first arg is ok ! :arg1 ! if [%1] == [bcc32] goto begin ! if [%1] == [djgpp] goto begin ! if [%1] == [mingw32] goto begin ! if [%1] == [msvc] goto begin ! goto help ! ! ! rem echo header to makefile, then goto platform specific section ! :begin ! echo # generated by fix.bat > makefile ! if [%1] == [bcc32] goto bcc32 ! if [%1] == [djgpp] goto djgpp ! if [%1] == [mingw32] goto mingw32 ! if [%1] == [msvc] goto msvc ! echo internal error: not reached ! goto end ! ! ! :bcc32 ! echo Configuring CCOM for Windows/BCC32... ! echo MAKEFILE_INC = makefile.bcc >> makefile ! goto finish ! ! ! :djgpp ! echo Configuring CCOM for DOS/djgpp... ! echo MAKEFILE_INC = makefile.dj >> makefile ! goto finish ! ! ! :mingw32 ! echo Configuring CCOM for Windows/Mingw32... ! echo MAKEFILE_INC = makefile.mgw >> makefile ! goto finish ! ! ! :msvc ! echo Configuring CCOM for Windows/MSVC... ! echo MAKEFILE_INC = makefile.vc >> makefile ! goto finish ! ! ! :help ! echo. ! echo Usage: fix platform [--quick] ! echo. ! echo Where platform is one of: djgpp, mingw32, msvc or bcc32. ! echo The --quick parameter is used to turn off LF to CR/LF conversion. ! echo. ! goto end ! ! ! rem write end of makefile and possibly convert end of line format ! :finish ! echo include misc/makefile.all >> makefile ! ! if [%2] == [--quick] goto done ! if [%1] == [bcc32] goto done ! if [%1] == [mingw32] goto done ! ! echo Converting CCOM files to DOS CR/LF format... ! utod *.bat .../*.c .../*.h ! utod .../*.txt .../*._tx makefile* misc/makefile.* readme.* ! ! ! :done ! echo Done! ! ! ! :end |
From: <ras...@us...> - 2004-02-28 00:05:17
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12067 Modified Files: makefile.vc Log Message: Made the it build in msvc Index: makefile.vc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.vc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** makefile.vc 27 Feb 2004 23:31:30 -0000 1.7 --- makefile.vc 27 Feb 2004 23:48:23 -0000 1.8 *************** *** 122,126 **** ALLEGRO_DAT2C = $(subst \,/,$(ALLEGRO_DAT2C_X)) CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst \,/,$(CCOM_DAT_X)) CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) --- 122,126 ---- ALLEGRO_DAT2C = $(subst \,/,$(ALLEGRO_DAT2C_X)) CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) ! CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) CCOM_DAT_H = $(subst \,/,$(CCOM_DAT_H_X)) |
From: <ras...@us...> - 2004-02-27 23:48:24
|
Update of /cvsroot/ccomx/ccom/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8887 Modified Files: makefile.vc Log Message: Made the it build in msvc Index: makefile.vc =================================================================== RCS file: /cvsroot/ccomx/ccom/misc/makefile.vc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** makefile.vc 8 Feb 2004 20:47:22 -0000 1.6 --- makefile.vc 27 Feb 2004 23:31:30 -0000 1.7 *************** *** 121,124 **** --- 121,125 ---- ALLEGRO_DAT = $(subst \,/,$(ALLEGRO_DAT_X)) ALLEGRO_DAT2C = $(subst \,/,$(ALLEGRO_DAT2C_X)) + CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) CCOM_DAT = $(subst \,/,$(CCOM_DAT_X)) CCOM_DAT_C = $(subst \,/,$(CCOM_DAT_C_X)) *************** *** 131,134 **** --- 132,136 ---- ALLEGRO_DAT = $(subst /,\,$(ALLEGRO_DAT_X)) ALLEGRO_DAT2C = $(subst /,\,$(ALLEGRO_DAT2C_X)) + CGUI_DAT2C = $(subst /,\,$(CGUI_DAT2C_X)) CCOM_DAT = $(subst /,\,$(CCOM_DAT_X)) CCOM_DAT_C = $(subst /,\,$(CCOM_DAT_C_X)) |
From: <ch...@us...> - 2004-02-16 07:28:11
|
Update of /cvsroot/ccomx/ccom/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2171/src Modified Files: comunix.c comx.c Log Message: modifications due to the unix port Index: comunix.c =================================================================== RCS file: /cvsroot/ccomx/ccom/src/comunix.c,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** comunix.c 8 Feb 2004 20:57:51 -0000 1.1 --- comunix.c 16 Feb 2004 07:20:20 -0000 1.2 *************** *** 65,68 **** --- 65,72 ---- *error = 1; } + if (n) { + char s[100]; + sprintf(s, "number:%2x|OK", n); + Req("",s);} return n; } Index: comx.c =================================================================== RCS file: /cvsroot/ccomx/ccom/src/comx.c,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** comx.c 8 Feb 2004 20:47:22 -0000 1.4 --- comx.c 16 Feb 2004 07:20:20 -0000 1.5 *************** *** 139,143 **** t_serport *port = data; t_serialq *qel; ! unsigned char error, c; if (port->scanning) { --- 139,143 ---- t_serport *port = data; t_serialq *qel; ! unsigned char error, c=0; if (port->scanning) { |