/* > Original:
/* > Gzip build file for Primos.
/* > Author: Peter Eriksson, pen@lysator.liu.se
/*
/* Gcal build file for Primos.
/* Modified by: Thomas Esken  <esken@uni-muenster.de>
/*
type
type 'Building GCAL for PRIMOS - Please wait...'
type
&if ^ [exists *>PRIMOS>OBJ -dir] &then &do
      type 'Creating *>PRIMOS>OBJ directory...'
      type
      create *>PRIMOS>OBJ
   &end

type 'Compiling...

&set_var unit := 0

/*
/* &set_var cdefines  :=  -debug

como *>primos>compile.como
&do file &items [wild *>@@.c -single unit]
  &set_var filebase := [before %file% .]
  &if ^  [exists *>primos>obj>%filebase%.bin] &then &do
  type 'Compiling "'%file%'"...'
  ci *>%file% -binary *>primos>obj>=.bin %cdefines% -optionsfile *>primos>ci.opts
  &end
&end
close -unit %unit%
&set_var unit := 0

&do file &items [wild *>primos>@@.c -single unit]
  &set_var filebase := [before %file% .]
  &if ^  [exists *>primos>obj>%filebase%.bin] &then &do
  type 'Compiling "'%file%'"...'
  ci *>primos>%file% -binary *>primos>obj>=.bin %cdefines% -optionsfile *>primos>ci.opts
  &end
&end
como -end

type
type
type 'Binding...'

&set_var unit := 0
&data bind
  li ccmain
  load *>primos>obj>gcal
  load *>primos>obj>gcal_fil
  load *>primos>obj>gcal_hdy
  load *>primos>obj>gcal_hlp
  load *>primos>obj>gcal_prt
  load *>primos>obj>gcal_rc
  load *>primos>obj>gcal_rcc
  load *>primos>obj>gcal_rcu
  load *>primos>obj>gcal_tty
  load *>primos>obj>gcal_utl
  load *>primos>obj>getenv
  li c_lib
  li
  dynt -all
  nwc
  nitr
  ntw
  compress
  file *>primos>gcal.run
&end

&set_var unit := 0
&data bind
  li ccmain
  load *>primos>obj>txt2gcal
  li c_lib
  li
  dynt -all
  nwc
  nitr
  ntw
  compress
  file *>primos>txt2gcal.run
&end

&set_var unit := 0
&data bind
  li ccmain
  load *>primos>obj>tcal
  li c_lib
  li
  dynt -all
  nwc
  nitr
  ntw
  compress
  file *>primos>tcal.run
&end

type
type
type 'All done. (Hopefully).'
type 'The GCAL     executable should be in *>PRIMOS>GCAL.RUN'
type 'The TXT2GCAL executable should be in *>PRIMOS>TXT2GCAL.RUN'
type 'The TCAL     executable should be in *>PRIMOS>TCAL.RUN'
&return
