#                   --------------------------------
#                   Makefile   by nt / *INCOGNITA*
#                   --------------------------------

#Version  = Debug
Version = Final

Compiler = wcc386
#Compiler = wcc
Assembler = tasm

Nfo_Msg_Debug =Debug Version!
Nfo_Msg_Final =Final Version
Nfo_Msg = $(Nfo_Msg_$(Version))

Compiler_Options_Debug = /mf /d2 /w3
Compiler_Options_Final = /mf /w3 /oneatx /zp4 /5r /fp5 /fpi87
Compiler_Options = $(Compiler_Options_$(Version)) /i$(%watcom)\icg_lib

Linker_Options_Debug   = debug all
Linker_Options_Final   =
Linker_Options   = $(Linker_Options_$(Version))

Asm_Options_Debug = /m3 /q /w2 /zi /z
Asm_Options_Final = /m9 /q /w2 /z
Asm_Options = $(Asm_Options_$(Version))

System       = pmodew
#System      = dos4g
#System      = dos

Exe_file     = mayhem.exe

Object_files = mayhem.obj             &
               matrix.obj             &
               tga.obj                &
               blur.obj               &
               wire.obj               &
               3d_cr.obj              &
               zoom\zoom.obj          &
               zoom\zoomi.obj         &
               world\land.obj         &
               world\camera.obj       &
               world\file.obj         &
               world\render.obj       &
               world\clip.obj         &
               world\scan.obj         &
               world\scan32.obj       &
               world\surface.obj      &
               world\scan_i.obj       &
               world\scan32_i.obj     &
               bump3d\bump.obj        &
               bump3d\ptext16.obj     &
               metaball\meta.obj      &
               metaball\text16.obj    &
               particle\part.obj      &
               particle\db.obj        &
               bspline\bsp3d.obj      &
               bspline\text16t.obj    &
               bspline\text15t.obj    &
               ray\ray.obj            &
               ray\ray_i.obj          &
               karateka\karate.obj    &
               karateka\gtext16.obj

Lib_files    =  $(%watcom)\icg_lib\icg_demo.lib  &
                seal\music.lib

Stack        = 40960

####################
## Makefile rules ##
####################

$(Exe_file): $(Object_files)
             @echo $(Nfo_Msg)
!ifdef Lib_files
             *wlink system $(System) $(Linker_Options) name $(Exe_file) &
                file {$(Object_files)} library {$(Lib_files)}           &
                option stack = $(Stack)
!else
             *wlink system $(System) $(Linker_Options) name $(Exe_file) &
                file {$(Object_files)} option stack = $(Stack)
!endif
             pmwlite.exe /C4 $(Exe_file)

.c.obj:
        *$(Compiler) $(Compiler_Options) $<


.asm.obj:
        $(Assembler) $(Asm_Options) $<


.AFTER

    @echo ----------------Finished------------------

.BEFORE

    @echo ----------Running nt's Makefile----------
