# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
# ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
# PARTICULAR PURPOSE.
#
# Copyright (C) 1993 - 1995  Microsoft Corporation.  All Rights Reserved.
#
#
# Processor independent makefile

# Nmake macros for building Windows 32-Bit apps
APPVER=4.0
!include <win32.mak>

DLLNAME = DLLSKEL
PROJ    = APPSKEL


all: $(PROJ).exe $(DLLNAME).dll

# Define project specific macros
PROJ_OBJS  = appskel.obj
BASE_OBJS  = winmain.obj init.obj dispatch.obj misc.obj about.obj
EXTRA_LIBS = version.lib
GLOBAL_DEP = globals.h
RC_DEP     =

DLL_OBJS   = dllmain.obj exports.obj
DLL_DEP    = dllglob.h


# Dependencies
appskel.obj:  appskel.c  $(GLOBAL_DEP) dllskel.h
winmain.obj:  winmain.c  $(GLOBAL_DEP)
init.obj:     init.c     $(GLOBAL_DEP)
dispatch.obj: dispatch.c $(GLOBAL_DEP)
misc.obj:     misc.c     $(GLOBAL_DEP)
about.obj:    about.c    $(GLOBAL_DEP)

dllmain.obj:  dllmain.c  $(DLL_DEP)
exports.obj:  exports.c  $(DLL_DEP)



# Inference rule for updating the object files
.c.obj:
  $(cc) $(cdebug) $(cflags) $(cvarsdll) $*.c



# Build rule for inport library
#$(DLLNAME).lib: $(DLL_OBJS)
#    $(implib)             \
#    -machine:$(CPU)       \
#    -out:$(DLLNAME).lib   \
#    $(DLL_OBJS)


# Build rule for the DLL
$(DLLNAME).dll: $(DLL_OBJS)
    $(link)                    \
    $(linkdebug) $(dlllflags)  \
    -base:0x1C000000           \
    -out:$(DLLNAME).dll        \
	-implib:$(DLLNAME).lib	   \
    $(DLL_OBJS) $(guilibsdll)



# Build rule for resource file
$(PROJ).res: $(PROJ).rc $(RC_DEP)
    $(rc) $(rcflags) $(rcvars) /fo $(PROJ).res $(PROJ).rc

# Build rule for EXE
$(PROJ).EXE: $(BASE_OBJS) $(PROJ_OBJS) $(PROJ).res $(DLLNAME).dll
    $(link) $(linkdebug) $(guilflags) \
    $(BASE_OBJS) $(PROJ_OBJS) $(PROJ).res $(guilibsdll) $(EXTRA_LIBS) \
    $(DLLNAME).lib \
    -out:$(PROJ).exe $(MAPFILE)



# Rules for cleaning out those old files
clean:
    del *.bak 
    del *.pdb 
    del *.obj 
    del *.res 
    del *.exp 
    del *.map 
    del *.sbr 
    del *.bsc
