# makefile for w32util.dll
# copyright 1997 Patrick McPhee
# distributed under the GNU Library General Public License version 2
# $Header: C:/ptjm/rexx/w32funcs/RCS/Makefile 1.19 2003/02/27 16:03:52 ptjm Rel $

OPT=-Ox -G5
DEBUG=#-Zi

INCDIR=../Regina
LIBDIR=..\Regina

CFLAGS=-nologo $(OPT) $(DEBUG) -GF -I$(INCDIR) -MD
CPPFLAGS=-nologo $(OPT) $(DEBUG) -GF -I$(INCDIR) -MD
CDYNFLAGS=-DDYNAMIC -GD
CSTTFLAGS=-GA
CC=cl
LIBS=kernel32.lib advapi32.lib $(LIBDIR)\regina.lib ole32.lib oleaut32.lib uuid.lib user32.lib shell32.lib comdlg32.lib

OBJS=w32funcs.obj w32ole.obj rxsupport.obj services.obj shell.obj control.obj addfunc.obj\
 clipboard.obj w32util.res

all : w32util.dll getoleclass.exe


w32util.dll : $(OBJS) w32util.def
	$(CC) -LD $(CFLAGS) -Few32util.dll $(OBJS) -link /def:w32util.def $(LIBS)

w32funcs.obj : w32funcs.c w32funcs.h rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c w32funcs.c

w32ole.obj : w32ole.cpp w32funcs.h rxproto.h
	$(CC) $(CPPFLAGS) $(CDYNFLAGS) -c w32ole.cpp

services.obj : services.c w32funcs.h rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c services.c

shell.obj : shell.c w32funcs.h rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c shell.c

addfunc.obj : addfunc.c w32funcs.h rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c addfunc.c

control.obj : control.c w32funcs.h rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c control.c

clipboard.obj : clipboard.c w32funcs.h rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c clipboard.c

rxsupport.obj : rxsupport.c rxproto.h
	$(CC) $(CFLAGS) $(CDYNFLAGS) -c rxsupport.c

getoleclass.obj : getoleclass.cpp
	cl $(CFLAGS) -GA -GX -c getoleclass.cpp

getoleclass.res : getoleclass.rc w32ver.h
	rc getoleclass.rc

getoleclass.exe : getoleclass.obj getoleclass.res
	cl $(CFLAGS) -GA -GX getoleclass.obj getoleclass.res oleaut32.lib uuid.lib setargv.obj ole32.lib

w32util.res : w32util.rc w32ver.h
	rc w32util.rc

debug:
	$(MAKE) $(MAKEFLAGS) OPT= DEBUG=-Zi


clean:
	-del /f/q *.obj *.dll *.ilk *.lib *.pdb *.exp *.res getoleclass.exe
