On Tue, 7 Aug 2007, Howard L. wrote:

I am not very familiar with the make procedure but with Frank Krause's outline in an earlier post coupled with the various package instructions I muddled through.

Honestly, I don't know why people make this into something complicated. It's simpler than ever now... you can skip all these steps:

- created the Build directory:
   mkdir Build
- copied 'mingw32.mak' to new dir. renaming it to 'Makfile' along the way:
   copy mingwin32.mak Build\Makefile
- Moved to that directory and made sure it was there:
   cd Build
- Ok, so I'm now in:  C:\cs1300\pdcurs33\win32\Build>
- I opened Makefile in an editor:
   edit Makefile      (or other editor)
- With this Makefile I only needed to change line 15
   from:  PDCURSES_SRCDIR = ..
   to  :  PDCURSES_SRCDIR = C:\cs1300\pdcurs33

Instead, just stop right there in the win32 directory, and type "make -f mingwin32.mak". That's it. Now, yes, you can build in a separate directory if you _want_ to, for whatever reason; but if all you're trying to do is get it built, I don't recommend overcomplicating it. And if you do want to build in a different directory, you don't need to edit the makefile, nor copy it. Rather, just set the PDCURSES_SRCDIR environment variable beforehand. In your example, that would mean:

set PDCURSES_SRCDIR=c:\cs1300\pdcurs33
make -f ..\mingwin32.mak

(or "make -f c:\cs1300\pdcurs33\win32\mingwin32.mak" if your "Build" directory wasn't under the "win32" directory).

- From there I typed the command to make all:
   make -f Makefile all

"all" is the default target, and need not be specified. Also, "Makefile" is the default makefile name, and need not be specified either (though you shouldn't be making this copy anyway).

- It made the object files and pdcurses.a file but no curses.h

curses.h is not meant to be built; it's already provided.

gcc  -otuidemo.exe tuidemo.o tui.o
       \cs1300\pdcurs33/curses.h pdcurses.a pdcurses.a
gcc: compilation of header file requested
C:\CS1300\BIN\MAKE.EXE: *** [tuidemo.exe] Error 1

Weird... I can't reproduce that. I guess this is an old version of MinGW?

Anyway, the problem there is that I changed the build line for tuidemo to use "$?" instead of explicitly specifying "tuidemo.o tui.o", as in previous versions. Unfortunately it also brings in curses.h and pdcurses.a (so that's listed twice). This doesn't cause an error in the version of MinGW I have, but it is ugly. I've reverted it for the next version; thanks for reporting it.

- - I'm not good with makefiles, but it looks like these
   demos were set to be built:
     firework.exe newdemo.exe rain.exe testcurs.exe worm.exe xmas.exe
   but these are the only ones that did build:
     newdemo.exe  testcurs.exe  xmas.exe
   so something happened to:
     firework.exe  rain.exe  and  worm.exe

The demos listed after tuidemo (in libobjs.mif) weren't built, because the make process had already aborted.

--
William McBrine <[EMAIL PROTECTED]>

Reply via email to