all: wce.exe

OPTS = -c -AS -Gsw -Zpe -W2 -Oas $(DEFINES)
CC = cl $(OPTS) -NT

OBJS = wce.obj wceinit.obj wcefile.obj wcefind.obj wceprint.obj\
  wceopen.obj ribbon.obj misc.obj about.obj register.obj

wce.obj: wce.c wce.h
    $(CC) _TEXT $*.c

wceinit.obj: wceinit.c wce.h
    $(CC) _WCEINIT $*.c

wcefind.obj: wcefind.c wce.h
    $(CC) _WCEFIND $*.c

wcefile.obj: wcefile.c wce.h
    $(CC) _WCEFILE $*.c

wceprint.obj: wceprint.c wce.h
    $(CC) _WCEPRINT $*.c

wceopen.obj: wceopen.c wce.h
    $(CC) _WCEFILE $*.c

ribbon.obj: ribbon.c wce.h
    $(CC) _RIBBON $*.c

misc.obj: misc.c wce.h
    $(CC) _MISC $*.c

about.obj: about.c wce.h
    $(CC) _ABOUT $*.c

register.obj: register.c wce.h
    $(CC) _REG $*.c

wce.res: wce.rc wce.h wce100.ico
    rc -r $(DEFINES) wce.rc

wce.exe: $(OBJS) wce.lnk wce.def wce.res
    link @wce.lnk
    rc wce.res
