% Copyright (C) 1992, Digital Equipment Corporation
% All rights reserved.
% See the file COPYRIGHT for a full description.
%
% File: m3makefile
% Last modified on Tue Jan 24 13:10:54 PST 1995 by kalsow
%      modified on Wed Jun  2 12:06:33 PDT 1993 by muller

% remove_m3_option ("-gui")
% m3_option ("-times")

import ("libm3")
import ("m3middle")
import ("m3linker")
import ("m3front")
import ("m3quake")
%import ("cmkey")

include ("version.quake")
version_impl ("Version")

module ("M3Backend")
import ("m3objfile")
import ("m3back")
if equal (OS_TYPE, "POSIX")
  implementation ("UtilsPosix")
else
  implementation ("UtilsWin32")
end

module ("Arg")
module ("Builder")
module ("Dirs")
module ("M3Build")
module ("M3Loc")
module ("M3Options")
module ("M3Path")
module ("M3Unit")
module ("Makefile")
module ("Msg")
module ("Utils")
module ("WebFile")
implementation ("Main")

build_standalone () %-- we don't want to depend on the shared libraries...

% Some platforms do not allow overwriting binaries that are currently
% executed, hence the default is not to install the cm3 binary in place.
% This also saves the user from accidentally overwriting the currently
% used compiler. To install the binary, you can either use the
% install-cm3-compiler script from the scripts/ directory or set the
% INSTALL_CM3_IN_BIN environment variable to "yes".
if equal($INSTALL_CM3_IN_BIN, "yes")
Program ("cm3")
else
program ("cm3")
end

%% install a fresh copy of the configuration file too...
%cp_if (format ("..%ssrc%sconfig%s%s", SL, SL, SL, TARGET), "cm3.cfg")
%BindExport ("cm3.cfg")

%-- the man page is *very* stale, don't bother.
% ManPage ("m3","1")

