Makefile-cygwin-readme I'm making these notes as prc-tools didn't quite install exactly as the installation notes said. It could well be to do with the confused collections of cygwin versions on my PC.
If you're interested in doing palm development with cygwin you probably already have cygwin. What? You've already got linux! Oh well then you're set. You can get the same prc-tools development environment going with much less hassle. :) Anyway back to people stuck with windows. At least you are familiar with unix a little, yes? If not it is well worth installing cygwin anyway. It's a great way of learning unix tools. It may take you a few years! :) Cygwin FAQ
When installing cygwin make sure and install development tools. (You can go back and check more boxes to install more stuff. make is essential I would always have others (perl, gcc (for Cygwin), sed, awk, grep, ...)
after Cygwin is working you get the palmOS development tools. Tools & links to other tools from Palm here: Read cygwin instructions: installing prc-tools on cygwin
e.g. [bash] ...src/: ls /PalmDev/sdk Palm OS 4.0 SDK ReadMe.txt Readme Before Deleting.txt lib/ Palm OS SDK Licenses/ include/ [bash] ...src/: ls /PalmDev/sdk/include/ BuildDefaults.h Dynamic/ PalmOS.h PalmTypes.h Pilot.h~ BuildDefines.h Extensions/ PalmOS.pch PalmUtils.h header.gcc Core/ PalmCompatibility.h PalmOS.win.pch Pilot.h libraries/ (that Pilot.h is a hack for converting old types (from sdks before 3.5) lazily) e.g. see paper about upgrading
Your mileage may vary ... but ... when I installed them I had to do a few extras to get full use from them. And partially because I wanted some software to compile without me messing with it's source code. Many palm programs should work with none or just some of the following adjustments: They installed here:
ls /usr/m68k-palmos/ include/ lib/ real-bin/And in /usr/bin:
ls /usr/bin/m68k-palmos-* /usr/bin/m68k-palmos-addr2line.exe* /usr/bin/m68k-palmos-obj-res.exe* /usr/bin/m68k-palmos-ar.exe* /usr/bin/m68k-palmos-objcopy.exe* /usr/bin/m68k-palmos-as.exe* /usr/bin/m68k-palmos-objdump.exe* /usr/bin/m68k-palmos-c++.exe* /usr/bin/m68k-palmos-protoize.exe* /usr/bin/m68k-palmos-c++filt.exe* /usr/bin/m68k-palmos-ranlib.exe* /usr/bin/m68k-palmos-gasp.exe* /usr/bin/m68k-palmos-size.exe* /usr/bin/m68k-palmos-gcc@ /usr/bin/m68k-palmos-strings.exe* /usr/bin/m68k-palmos-gdb.exe* /usr/bin/m68k-palmos-strip.exe* /usr/bin/m68k-palmos-ld.exe* /usr/bin/m68k-palmos-stubgen.exe* /usr/bin/m68k-palmos-multigen.exe* /usr/bin/m68k-palmos-unprotoize.exe* /usr/bin/m68k-palmos-nm.exe*Those files marked witn @'s are links which I made. Different versions of cygwin may have things in different places (but actually this is my fault for having old versions of cygwin lying around).
ln -s /usr/m68k-palmos/real-bin/gcc /usr/bin/m68k-palmos-gcc
mkdir /usr/m68k-palmos/bin cd /usr/m68k-palmos/bin ln -s /usr/bin/m68k-palmos-addr2line.exe addr2line.exe ln -s /usr/bin/m68k-palmos-ar.exe ar.exe ln -s /usr/bin/m68k-palmos-as.exe as.exe ln -s /usr/bin/m68k-palmos-c++.exe c++.exe ln -s /usr/bin/m68k-palmos-c++filt.exe c++filt.exe ln -s /usr/bin/m68k-palmos-gasp.exe gasp.exe ln -s /usr/bin/m68k-palmos-gdb.exe gdb.exe ln -s /usr/bin/m68k-palmos-ld.exe ld.exe ln -s /usr/bin/m68k-palmos-multigen.exe multigen.exe ln -s /usr/bin/m68k-palmos-nm.exe nm.exe ln -s /usr/bin/m68k-palmos-obj-res.exe obj-res.exe ln -s /usr/bin/m68k-palmos-objcopy.exe objcopy.exe ln -s /usr/bin/m68k-palmos-objdump.exe objdump.exe ln -s /usr/bin/m68k-palmos-protoize.exe protoize.exe ln -s /usr/bin/m68k-palmos-ranlib.exe ranlib.exe ln -s /usr/bin/m68k-palmos-size.exe size.exe ln -s /usr/bin/m68k-palmos-strings.exe strings.exe ln -s /usr/bin/m68k-palmos-strip.exe strip.exe ln -s /usr/bin/m68k-palmos-stubgen.exe stubgen.exe ln -s /usr/bin/m68k-palmos-unprotoize.exe unprotoize.exeSo before calling make you can set PATH=/usr/bin/m68k-palmos-gcc:$PATH Then gcc or nm or objdump or whatever will call the palm version, not the cygwin version.
This is the useful line that made the above easy: [bash] ...src/: ls /usr/bin/m68k-palmos-* |sed s/\*//|sed "s#\(.*palmos-\)\(.*\)#ln -s \1\2 \2#"
cd /usr/m68k-palmos/include/ ln -s /usr/include/stdlib.h unix_stdlib.h ln -s /usr/include/string.h unix_string.h ls /usr/m68k-palmos/include/ ctype.h mathf.h stdlib.h unix_stdlib.h@ errno.h setjmp.h string.h malloc.h stdio.h sys/ unix_string.h@
gcc -O2 -g -DUNIX -DWINGUI pilrc.o lex.o util.o bitmap.o main.o -o pilrc
You can get quite a few GUI resource editors precompiled if you want. You might want to put the following in win.c:
#ifndef UNIX /* cygwin */ #include "afxres.h" #endif AND: #ifdef UNIX /* cygwin /usr/include/w32api/winbase.h */ int APIENTRY WinMain(HINSTANCE hinst, HINSTANCE hinstPrev, LPSTR lpszCmdLine, int nCmdShow) #else int PASCAL WinMain(HANDLE hinst, HANDLE hinstPrev, LPSTR lpszCmdLine, int nCmdShow) #endif