CFLAGS=-O
LDFLAGS=-s -nounderscores -subsystem windows -dll

all: in_ym.dll

in_ym.dll: in_ym.obj ym2612.obj sn76496.obj ym2151.obj resource.res
	lcclnk $(LDFLAGS) in_ym.obj ym2612.obj sn76496.obj ym2151.obj resource.res zlib.lib
	@del in_ym.lib
	@del in_ym.exp

in_ym.obj: in_ym.c ym2612.h sn76496.h in_ym.h ym2151.h
	lcc $(CFLAGS) in_ym.c

ym2612.obj: ym2612.h ym2612.c
	lcc $(CFLAGS) ym2612.c

sn76496.obj: sn76496.h sn76496.c
	lcc $(CFLAGS) sn76496.c

ym2151.obj: ym2151.c ym2151.h
	lcc $(CFLAGS) ym2151.c

resource.res: resource.rc resource.h afxres.h
	lrc resource.rc

clean:
	del in_ym.obj
	del ym2151.obj
	del ym2612.obj
	del sn76496.obj
	del resource.res

veryclean:
	del in_ym.dll
	del in_ym.obj
	del ym2151.obj
	del ym2612.obj
	del sn76496.obj
	del resource.res
