joncampbell123 / doslib

Hackipedia DOSLIB, a general collection of useful libraries for writing MS-DOS software
GNU Lesser General Public License v2.1
210 stars 18 forks source link

fixes for cross-compilation of doslib #41

Closed jmalak closed 5 years ago

jmalak commented 5 years ago
jmalak commented 5 years ago

Fix was relatively simple for OW2.0 use -x option (ignore INCLUDE env.variable) and add all OW header path (for target) to WATCOM_INCLUDE, which is add to compiler command line remove this mechanism for assembler because OW has not any header file for it rest of changes was not necessary but clear include path that doesn't use $(HPS) macro I test only compilation by OW1.9 and OW2.0 without any problem

Now standard OW environment variable should be setup for Linux host before run any build. It looks like this export WATCOM=/home/jiri/ow-v2/rel export PATH=$WATCOM/binl:$WATCOM/binw:$PATH export EDPATH=$WATCOM/eddat export INCLUDE=$WATCOM/lh don't forgot include $WATCOM/binw: on the PATH, it is necessary for linker to find stubs etc.

joncampbell123 commented 5 years ago

I did not know you could split lines like that in a *.mak file:

wlib -q -b -c $(EXT_LAME_LIB) & -+$(SUBDIR)$(HPS)bitstream.obj & -+$(SUBDIR)$(HPS)encoder.obj & -+$(SUBDIR)$(HPS)fft.obj & ...

jmalak commented 5 years ago

It is better readable. generaly '&' character is continuation of line in wmake make files

joncampbell123 commented 5 years ago

I'll keep that in mind, it makes it easier to see what was added to the list through git diff.