proj_name = whelp

!include cproj.mif
!include deftarg.mif
!include defrule.mif

inc_dirs = $(help_dir)/h;$(ui_dir)/h;$(trmem_dir)

.c: ../c;$(trmem_dir)

!include ../help.mif

objs =  main.obj filelist.obj
objs += $(help_objs)

!ifdef whelp_trmem
extra_c_flags += -dTRMEM
objs +=  trmemcvr.obj trmem.obj
!endif

!ifeq host_OS linux
libs = $(ui_dir)/unix/$(host_OS)$(host_CPU)/ui.lib $(ncurses_dir)/$(host_OS)$(host_CPU)/ncurses.lib
!else
libs = $(ui_dir)/$(host_OS)/$(host_OS)$(host_CPU)/ui.lib
!endif
extra_l_flags = op map l { $(libs) }

$(proj_name).exe : $(objs) $(libs)
        $(linker) option quiet $(lflags) name $^. file { $(objs) }
