%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%    azpc InputFile For Make (prolog,prolog_c,prolocgi)   2013.11.8   %%
%%                                                                     %%
%% [Name]             [What is this]                    [Input Define] %%
%% azserv.exe         OLE Automation Server             #define azserv %%
%% prolog(.exe)       Window Aplication Interpreter     #define win    %%
%% prologcgi(.exe)    CGI Interpreter                   #define cgi    %%
%% prolog_c(.exe)     Console/ChildProcess Interpreter   (None)        %%
%%                                                                     %%
%%  ==== How To Use This File ===                                      %%
%%  >azpc -p  "#define" azserv  /f prolog_exe.txt                        %%
%%  >azpc -p  "#define" cgi     /f prolog_exe.txt                        %%
%%  >azpc -p  "#define" win     /f prolog_exe.txt                        %%
%%  >azpc -p                    /f prolog_exe.txt                        %%
%%                                                                     %%
%%  azpc(AZProlog Compiler) Compile Options are showed                 %%
%%   >azpc                                                             %%
%%                                                                     %%
%%  * Windows MeCab,CaBocha Can Only Userd on 32Bit Now                %%
%%  * Use ChezEdit-NT or Emacs Insted of AZEDIT                        %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% #define WINDOWS                   % WINDOWS 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Windows/Linux Common Option & Source 

/i                                   % All builtin predicate
/e $(EXE)                            % Execute File Name

$(AZ_DIR_PL)/mlt_parent.pl           % Parallel Invocation Package
$(AZ_DIR_PL)/setof.pl                % bagof,setof,Package
$(AZ_DIR_PL)/utility.pl              % Prolog Utility (RegualExpress etc.)
$(AZ_DIR_PL)/iso_pred.pl             % ISO predicate written by Prolog
$(AZ_DIR_PL)/macro_consult.pl        % macro consult
$(AZ_DIR_PL)/fs_utility.pl           % fstructure Utility 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% [[ EXE Type  ]]

#ifdef cgi
    #define EXE = $(BasePgName)cgi   % CGI Interpreter (prologcgi)
    $(AZ_DIR_PL)/prologcgi.pl        % CGI Top Level File
    /no                              % Don't Use start Option except Parameter
    /dcurses                         % Don't Use Curses Library
    /no_ole                          % Don't Use OLE AutoMation 
#else
    #ifdef azserv
       #define EXE  = azserv         % OLE AutoMation Server (azerv.exe) 
       $(AZ_DIR_PL)/azserv.pl
    #else
        $(AZ_DIR_PL)/manual.pl               % manual display
        #ifdef win
           #define EXE = $(BasePgName)      % Normal Interpreter
        #else
           #define EXE = $(BasePgName)_c    % Console Interpreter
           $(AZ_DIR_PL)/mlt_child.pl        % Parallel Child Management
           /dcurses                         % Don't Use Curses Library
        #endif
    #endif
#endif

%%%%%%%%%%%%%%%%%%%%%%%%
%% Basic Variable

#ifdef WINDOWS
   %% Windows
   #define MyAZProlog = $(AZProlog)
   #define AZOBJ      = $(AZProlog)/obj
   /lib $(AZOBJ)/prolog.res              % Icon ImageFile
   /lib ws2_32.lib                       % WinSock Library (Using in azsocket.c)
#else
   %% Linux 

   #ifdef AZProlog
        #define MyAZProlog = $(AZProlog)/share/azprolog
        #define AZOBJ      = $(AZProlog)/lib/azprolog/obj
   #else
        #define MyAZProlog = /usr/local/share/azprolog
        #define AZOBJ      = /usr/local/lib/azprolog/obj
   #endif

   $(AZ_DIR_C)/mytime.c
   $(AZ_DIR_C)/az_syslog.c 
#endif

#define BasePgName  = prolog                   % Basic Exe File is "prolog"
#define AZ_DIR_PL   = $(MyAZProlog)/system/pl  % System PL source DIR
#define AZ_DIR_C    = $(MyAZProlog)/system/C   % System C source DIR

