include $(SRC_ROOT_BASH)/Makefile.rules

CFLAGS = /O2 /G5 /GD /GX

JAVA_FILES = \
	DirectInputDevice.java \
	DirectXVideoOutputDevice.java \
	Win32ClockDevice.java \
	Win32PlugIn.java

CPP_FILES = \
	BlissWin32PlugIn.cpp \
	BlissWin32ClockDevice.cpp \
	BlissDirectInputDevice.cpp \
	BlissDirectXVideoOutputDevice.cpp \
	DirectInputDevice.cpp \
	DirectInputSignal.cpp \
	DirectXAudioOutputDevice.cpp \
	DirectXVideoOutputDevice.cpp \
	Win32ClockDevice.cpp \
	Win32PlugIn.cpp

DLL_FILE = \
	BlissNativeWin32.dll

TARGETS = all clean

all: $(CLASSES) jniheaders $(OBJECTS) $(DLL_FILE)

clean:
	$(RM) -f com_blissjx_plugin_*.h; \
	$(RM) -f *.dll; \
	$(RM) -f *.exp; \
	$(RM) -f *.lib; \
	$(RM) -f *.class; \
	$(RM) -f *.obj; \
	$(RM) -f *.o

jniheaders:
	for nextclass in $(CLASSES); do \
		$(JAVAH) com.blissjx.plugin.`basename $$nextclass .class`; \
	done

LIBS = D3d8.lib \
	D3dx8.lib \
	Dinput.lib \
	Dsound.lib \
	Dinput8.lib \
	Dxguid.lib \
	user32.lib \
	gdi32.lib

$(DLL_FILE): $(JAVAH_INCLUDE_FILES) $(OBJECTS)
	$(CC) /MD /LD /GD $(OBJECTS) /link $(LIBS) /machine:I386 /pdbtype:sept /incremental:no /out:"$(DLL_FILE)"

