#
# Paramters:
#
# TARGET  : clib, mathlib, cpplib, rtdll
# OS      : msdos, windows, os2, winnt, netware
# CPU     : 16bit, 32bit
# MODEL   : small, medium, compact, large, huge, flat
#

!ifndef OS
OS      = all
!endif

!ifndef TARGET
CPPLIB  = 1
MATHLIB = 1
RTDLL   = 1
CLIB    = 1
!else
!ifeq TARGET CLIB
CLIB = 1
!endif

!ifeq TARGET MATHLIB
MATHLIB = 1
!endif

!ifeq TARGET CPPLIB
CPPLIB = 1
!endif

!ifeq TARGET RTDLL
RTDLL = 1
!endif
!endif

all: .symbolic
!ifeq CLIB 1
    @cd clib
    @wmake -h OS=$(OS) CONVENTION=$(CONVENTION) MODEL=$(MODEL) CPU=$(CPU)
    @cd ..
!endif
!ifeq MATHLIB 1
    @cd mathlib
    @wmake -h OS=$(OS) CONVENTION=$(CONVENTION) MODEL=$(MODEL) CPU=$(CPU)
    @cd ..
!endif
!ifeq CPPLIB 1
    @cd cpplib
    @wmake -h OS=$(OS) CONVENTION=$(CONVENTION) MODEL=$(MODEL) CPU=$(CPU)
    @cd ..
!endif
!ifeq RTDLL 1
    @cd rtdll
    @wmake -h OS=$(OS) CONVENTION=$(CONVENTION) MODEL=$(MODEL) CPU=$(CPU)
    @cd ..
!endif

clean: .symbolic
    ..\bin\pmake -d -b all -h clean
    @tmp.cmd
    @del tmp.cmd
    
