Help with Makefile

Alejandro Pulver alejandro at varnet.biz
Fri Sep 9 12:28:06 PDT 2005


Hello,

I am making a port of Quake III Arena SDK: it installs game sources,
tools to produce QVM files, and a Makefile.

The original game source comes with the "cons" building system and I am
trying to write a Makefile to replace it. I have troubles while
writting the Makefile.

Here is what I want to do:

* Use a directory for compiled/temporary/object files (e.g. "build").
* Dependency support (now targets are recreated all the time).
* Automatic dependency support (e.g. "mkdep").
* Handle the suffix problem when "qvm" and "so" targets are built at
  the same time.

Here is the description of the build steps (see the Makefile for
implementation):

For building the shared object just compile the C sources listed in
(CGAME|GAME|UI)_SRCS_SO and put them together with "cc
-shared ..." (I think this could be handled with bsd.lib.mk).

For building the QVM you should first create bytecode files (assembly)
from the sources listed in (CGAME|GAME|UI)_SRCS_QVM with q3lcc (note
that there are also some .asm files listed in the sources - one per
module cgame, game and ui - that don't need to be modified), then
assemble all the produced files with q3asm.

Here is what I have (attached):

Makefile.bz2       -	Last try.
Makefile.orig.bz2  -	Previous try (uses a build directory but
                        doesn't handle dependencies and can't build qvm
                        and so at the same time - suffix problem).
Makefile.gnu.bz2   -	Works fine, but it is for gmake (and for an
                        older version: 1.29h, this one is 1.32, however
                        the only change could be sources names/files).
quake3-sdk.tar.bz2 -	Port that installs game source (where the
                        Makefile has to be put) and the tools.

Any help will be appreciated.

Thanks and Best Regards,
Ale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.bz2
Type: application/octet-stream
Size: 1498 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050909/d15978c1/Makefile.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.gnu.bz2
Type: application/octet-stream
Size: 2695 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050909/d15978c1/Makefile.gnu.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Makefile.orig.bz2
Type: application/octet-stream
Size: 1485 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050909/d15978c1/Makefile.orig.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quake3-sdk.tar.bz2
Type: application/octet-stream
Size: 2509 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20050909/d15978c1/quake3-sdk.tar.obj


More information about the freebsd-ports mailing list