#this is the makfile for the Open Object Library (OS/2 version, EMX compiler)
#nessesary tools:
#gnu make
#emx 0.9b, emx fixpack 03 and emx multimedia package


include ..\make.def


#the object-files
OBJS= xapp.obj xbutton.obj xclipbrd.obj xcircsld.obj xcolor.obj xcont.obj xcontain.obj xcontrol.obj xdate.obj xentry.obj xevent.obj xfile.obj xfilefi.obj xframe.obj xfrmcnt.obj xfrmwnd.obj\
      xgraphbt.obj xgraphdv.obj xgraphob.obj xhandler.obj xhelp.obj xlistbox.obj xmedia.obj xmenu.obj xmle.obj xmsgbox.obj xobjwnd.obj xrect.obj xreslib.obj xscrlbar.obj xscrlwnd.obj\
      xslider.obj xspinbtn.obj xstatic.obj xstring.obj xthread.obj xtime.obj xtoolbar.obj xuserwnd.obj xvaluset.obj xwindow.obj xwindrag.obj

 %.obj: %.cpp
	@echo Compiler :: compiling $<
	$(COMPILE) $(OPT) $(MAKEDLL) $<


OOLM3E01.DLL: $(OBJS)
#	@echo EMX :: Building import-library...
#	emxomfar rc ool01a.lib *.obj
	@echo EMX :: Building definition-file
	emxexp -n -o $(OBJS) > imp.tmp
	copy def.def + imp.tmp OOLM3E01.def
	@echo Linker :: link objects
	$(LINK) $(MAKEDLL) -o OOLM3E01.DLL $(OBJS) c:\emx\lib\os2me.lib OOLM3E01.def -lstdcpp
	emximp -o OOLM3E01.LIB OOLM3E01.DEF
	@echo OS2 :: copy files
	copy OOLM3E01.lib c:\emx\lib
	copy OOLM3E01.DLL c:\os2\apps\dll
	copy OOLM3E01.lib ..\lib
	copy OOLM3E01.DLL ..\lib
	@echo OS2 :: clean
	del OOLM3E01.LIB
	del OOLM3E01.DLL


ALL: OOLM3E01.DLL


#dependencies of the object files

xapp.obj: xapp.cpp
xbutton.obj: xbutton.cpp
xclipbrd.obj: xclipbrd.cpp
xcircsld.obj: xcircsld.cpp
xcolor.obj: xcolor.cpp
xcont.obj: xcont.cpp
xcontain.obj: xcontain.cpp
xcontrol.obj: xcontrol.cpp
xdate.obj: xdate.cpp
xentry.obj: xentry.cpp
xevent.obj: xevent.cpp
xexcept.obj: xexcept.cpp
xfile.obj: xfile.cpp
xfilefi.obj: xfilefi.cpp
xframe.obj: xframe.cpp
xfrmcnt.obj: xfrmcnt.cpp
xfrmwnd.obj: xfrmwnd.cpp
xgraphbt.obj: xgraphbt.cpp
xgraphdv.obj: xgraphdv.cpp
xgraphob.obj: xgraphob.cpp
xhandler.obj: xhandler.cpp
xhelp.obj: xhelp.cpp
xlistbox.obj: xlistbox.cpp
xmedia.obj: xmedia.cpp
xmenu.obj: xmenu.cpp
xmle.obj: xmle.cpp
xmsgbox.obj: xmsgbox.cpp
xobjwnd.obj: xobjwnd.cpp
xrect.obj: xrect.cpp
xreslib.obj: xreslib.cpp
xscrlbar.obj: xscrlbar.cpp
xscrlwnd.obj: xscrlwnd.cpp
xslider.obj: xslider.cpp
xspinbtn.obj: xspinbtn.cpp
xstatic.obj: xstatic.cpp
xstring.obj: xstring.cpp
xthread.obj: xthread.cpp
xtime.obj: xtime.cpp
xtoolbar.obj: xtoolbar.cpp
xuserwnd.obj: xuserwnd.cpp
xvaluset.obj: xvaluset.cpp
xwindow.obj: xwindow.cpp
xwindrag.obj: xwindrag.cpp

clean:
	del *.s *.map *.tmp *.lib *.dll

