# Nmake macros for building Windows 32-Bit apps

!include <ntwin32.mak>

all: mixapp.exe

OBJS=  	mixapp.obj mainit.obj malines.obj mactrls.obj \
       	mameter.obj maswitch.obj mafader.obj malist.obj tlb.obj \
       	debug.obj

OTHERCLOPTS=-DWIN32_LEAN_AND_MEAN -nologo -I.
OTHERRCOPTS=-DWIN32_LEAN_AND_MEAN -I.


# Update the resource if necessary

mixapp.res: mixapp.rc mixapp.h mixapp.rcv mixapp.ico
    $(rc) -r -DWIN32 $(OTHERRCOPTS) mixapp.rc


# Update the object file if necessary

mainit.obj: mainit.c mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) mainit.c

mactrls.obj: mactrls.c mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) mactrls.c

malines.obj: malines.c mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) malines.c

mameter.obj: mameter.c muldiv32.h mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) mameter.c

maswitch.obj: maswitch.c mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) maswitch.c

mixapp.obj: mixapp.c mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) mixapp.c

debug.obj: debug.c debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) debug.c

malist.obj: malist.c mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) malist.c

tlb.obj: tlb.c tlb.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) tlb.c

mafader.obj: mafader.c muldiv32.h mixapp.h debug.h
    $(cc) $(cdebug) $(cflags) $(cvars) $(OTHERCLOPTS) mafader.c


# Update the executable file if necessary, and if so, add the resource back in.

mixapp.exe:  $(OBJS) mixapp.res
    $(link) $(linkdebug) $(guiflags) -out:mixapp.exe $(OBJS) mixapp.res $(guilibs) \
	winmm.lib

