#----------------------------------------------------------------------
# Get all the standard definitions
#----------------------------------------------------------------------
!include ../include/common1.mak

#----------------------------------------------------------------------
# Modify or override the default definitions here.
#----------------------------------------------------------------------
CPP_DEFINES=$(CPP_DEFINES) /D "XLIB"

LINK_LIBS=user32.lib gdi32.lib wsock32.lib

#----------------------------------------------------------------------
# Create the final definitions as a combination of the modified
# definitions and our own.
#----------------------------------------------------------------------
!include ../include/common2.mak

#----------------------------------------------------------------------
# Define the objects that make up modules
#----------------------------------------------------------------------

XLIB_OBJS = 	$(DIR)\xwinattr.obj \
	$(DIR)\panic.obj \
	$(DIR)\xhash.obj \
	$(DIR)\xcolor.obj \
	$(DIR)\xbell.obj \
	$(DIR)\xsetselo.obj \
	$(DIR)\xevent.obj \
	$(DIR)\xdefcur.obj \
	$(DIR)\topproc.obj \
	$(DIR)\termproc.obj \
	$(DIR)\cursor.obj \
	$(DIR)\xpixmap.obj \
	$(DIR)\xgraphic.obj \
	$(DIR)\xcreatew.obj \
	$(DIR)\xcontext.obj \
	$(DIR)\xalloc.obj \
	$(DIR)\msg2evt.obj \
	$(DIR)\adjust.obj \
	$(DIR)\xpropert.obj \
	$(DIR)\xclear.obj \
	$(DIR)\instance.obj \
	$(DIR)\xdisplay.obj \
	$(DIR)\lxlib.obj \
	$(DIR)\window.obj \
	$(DIR)\xgrab.obj \
	$(DIR)\xconfwin.obj \
	$(DIR)\xqupoint.obj \
	$(DIR)\xgc.obj \
	$(DIR)\xfont.obj \
	$(DIR)\callback.obj \
	$(DIR)\xseterrh.obj \
	$(DIR)\xkeysym.obj \
	$(DIR)\xatom.obj \
	$(DIR)\widgproc.obj \
	$(DIR)\chain.obj \
	$(DIR)\icon.obj \
	$(DIR)\sockutil.obj

COMPAT_OBJS = 

LINK_OBJS= $(XLIB_OBJS) $(COMPAT_OBJS)

DEF_FILE=lxlib.def
DEF_FLAGS=/DEF:$(DEF_FILE)

#----------------------------------------------------------------------
# Build rules
#----------------------------------------------------------------------
ALL: $(DIR)\lxlib.dll

$(DIR)\lxlib.dll:  $(DEF_FILE) $(LINK_OBJS)
	$(LINK) @<<
		$(LINK_FLAGS_DLL) $(DEF_FLAGS) $(LINK_OBJS) /IMPLIB:$(DIR)\lxlib.lib /OUT:$(DIR)\lxlib.dll
<<

ALL_OBJS=$(LINK_OBJS)
#----------------------------------------------------------------------
# Default build rules
#----------------------------------------------------------------------
!include "../include/common3.mak"
