#!nmake
#
# The contents of this file are subject to the Netscape Public License
# Version 1.0 (the "NPL"); you may not use this file except in
# compliance with the NPL.  You may obtain a copy of the NPL at
# http://www.mozilla.org/NPL/
#
# Software distributed under the NPL is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
# for the specific language governing rights and limitations under the
# NPL.
#
# The Initial Developer of this code under the NPL is Netscape
# Communications Corporation.  Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
# Reserved.

DEPTH=..\..\..
IGNORE_MANIFEST=1

MAKE_OBJ_TYPE = DLL
DLLNAME = raptorgfxwin
DLL=.\$(OBJDIR)\$(DLLNAME).dll
#RESFILE = $(DLLNAME).res

MODULE=raptor 

DEFINES=-D_IMPL_NS_GFX -D_IMPL_NS_GFXNONXP -DWIN32_LEAN_AND_MEAN -DSTRICT

!if defined(NGLAYOUT_DDRAW)
DEFINES=$(DEFINES) -DNGLAYOUT_DDRAW
!endif

MISCDEP=                        \
 $(DIST)\lib\raptorgfx_s.lib
 
OBJS =                                  \
	.\$(OBJDIR)\nsDeviceContextWin.obj   \
	.\$(OBJDIR)\nsRenderingContextWin.obj         \
	.\$(OBJDIR)\nsFontMetricsWin.obj          \
	.\$(OBJDIR)\nsImageWin.obj          \
	.\$(OBJDIR)\nsBlenderWin.obj				\
	.\$(OBJDIR)\nsRegionWin.obj          \
	.\$(OBJDIR)\nsDeviceContextSpecWin.obj          \
	.\$(OBJDIR)\nsDeviceContextSpecFactoryW.obj          \
	.\$(OBJDIR)\nsGfxFactoryWin.obj          \
	$(NULL)

LINCS= \
		-I..\
        -I$(PUBLIC)\raptor \
        -I$(PUBLIC)\xpcom \
        -I$(PUBLIC)\dom \
        -I$(PUBLIC)\js \
!if defined(NGLAYOUT_DDRAW)
!if "$(MOZ_VCVER)" == "50"
		-I$(NGLAYOUT_DDRAW)\include \
!else
		-I$(NGLAYOUT_DDRAW)\inc \
!endif
!endif
        $(NULL)

LCFLAGS = \
        $(LCFLAGS) \
		$(DEFINES) \
        $(NULL)

LLIBS=				\
 $(DIST)\lib\xpcom32.lib	\
 $(DIST)\lib\raptorbase.lib	\
 $(DIST)\lib\img32$(VERSION_NUMBER).lib        \
 $(DIST)\lib\js32$(VERSION_NUMBER).lib        \
 $(DIST)\lib\util.lib           \
 $(DIST)\lib\libplc21.lib       \
 $(DIST)\lib\netlib.lib       \
 $(DIST)\lib\raptorgfx_s.lib \
!if defined(NGLAYOUT_DDRAW)
 ole32.lib \
 $(NGLAYOUT_DDRAW)\lib\ddraw.lib \
!endif
 comdlg32.lib \
 $(LIBNSPR)  

LLFLAGS = \
		$(LLFLAGS) \
		/INCLUDE:_NS_HexToRGB@8 \
		/INCLUDE:_NS_ColorNameToRGB@8 \
		/INCLUDE:_NS_NewImageGroup@4 \
		/INCLUDE:_NS_NewImageRenderer@4 \
		/INCLUDE:_NS_NewImageSystemServices@4 \
		/INCLUDE:_NS_NewImageManager@4
		 
include <$(DEPTH)\config\rules.mak>

install:: $(DLL)
	$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).dll $(DIST)\bin
	$(MAKE_INSTALL) .\$(OBJDIR)\$(DLLNAME).lib $(DIST)\lib

clobber::
	rm -f $(DIST)\bin\$(DLLNAME).dll
	rm -f $(DIST)\lib\$(DLLNAME).lib
	
