#
# Trust Design LLC : SECS/HSMS Communication library
#
# (c) Copyright Trust Design LLC.  2010-2018.  All rights reserved.
#


#
# Targets
#

H0=		SubFunctions

P0=		SimpleIo
P1=		BasicIo
P2=		CallbackIo
PA=		CSIo
PB=		VBIo
PC=		JVIo
PD=		JavaIo


CFLAGS= 	-nologo -I.. -MT -W3 -D_CRT_SECURE_NO_WARNINGS -DWINDOWS
LFLAGS= 	-link -libpath:../Win32 TDS.lib
JFLAGS=		-encoding SJIS -source 1.7 -target 1.7 -classpath ../TDJVS.jar

CSFLAGS= 	-nologo -platform:x86 -unsafe 
LSFLAGS= 	-reference:../Win32/TDCSS.dll

CBFLAGS= 	-nologo -platform:x86 
LBFLAGS= 	-reference:../Win32/TDVBS.dll



#
# All product
#

all:		$(P0).exe	\
		$(P1).exe	\
		$(P2).exe	\
		$(PA).exe	\
		$(PB).exe	\
		$(PC).class

clean:
		-del *.exe
		-del *.obj
		-del *.class


#
# Relations
#

$(P0).exe:	$(P0).c
		cl -Fe$(P0).exe $(P0).c $(CFLAGS) $(LFLAGS)
		-del  $(P0).obj

$(P1).exe:	$(P1).c $(H0).h
		cl -Fe$(P1).exe $(P1).c $(CFLAGS) $(LFLAGS)
		-del  $(P1).obj

$(P2).exe:	$(P2).c $(H0).h
		cl -Fe$(P2).exe $(P2).c $(CFLAGS) $(LFLAGS)
		-del  $(P2).obj


$(PA).exe:	$(PA).cs
		csc   -out:$(PA).exe $(PA).cs   $(CSFLAGS) $(LSFLAGS)

$(PB).exe:	$(PB).vb
		vbc   -out:$(PB).exe $(PB).vb   $(CBFLAGS) $(LBFLAGS)

$(PC).class:	$(PC).java
		javac -d .	     $(PC).java $(JFLAGS)

$(PD).class:	$(PD).java
		javac -d .	     $(PD).java $(JFLAGS)
