Dave,
I think I see the root cause of my problem.
I took your makefile, executing it gets me the following:
===
[G:\CODE\SOURCE\BENCHMARKS\NBENCH]make
gcc -s -Zomf -Wall -O3 pointer.c -o pointer
ilink.exe: No such file or directory
make: *** [pointer] Error 1
===
'ilink.exe' does exist, just not anywhere in the PATH since it is part of the IBM C/C++ toolset I have installed on my machine, so I am not sure how this gets pulled in to the GCC process?
If on the other hand I remove the '-Zomf' from the 'CFLAGS = -s -Zomf -Wall -O3', then I can successfully compile and build the final nbench.exe, but the pointer EXE is never created, or rather, what is created can not be executed within an OS/2 session and subsequently I see how the makefile macro fails to build a proper pointer.h file.
HOWEVER
If I modify the makefile slightly and do the following (change in BOLD):
===
pointer.h: pointer Makefile
$(CC) $(MACHINE) $(DEFINES) $(CFLAGS)\
-o pointer
.exe pointer.c
rm -f pointer.h
if [ "4" = `./pointer` ] ; then touch pointer.h ;\
else echo "#define LONG64" >pointer.h ; fi
===
..then pointer.exe is created successfully, it runs during the build process and puts a '4' into pointer.h file.
All of that begs the question: what the heck is that '-Zomf' switch???
Sorry, unless I am missing the obvious I am not finding the answer out there. I most often try the following GCC sites for info:
1)
https://gcc.gnu.org/2)
https://gcc.gnu.org/onlinedocs/3)
https://www.gnu.org/manual/manual.html