#
-# File:                makefile.unx
+# File:                Makefile.in
 # Author:      Julian Smart
 # Created:     1998
 # Updated:     
 #
 # "%W% %G%"
 #
-# Makefile for thread example (UNIX).
+# Makefile for wxsocket example (UNIX).
 
 top_srcdir = @top_srcdir@
 top_builddir = ../../..
 program_dir = utils/wxMMedia2/sample
+# the comment at the end of the next line is needed because otherwise autoconf
+# would remove this line completely - it contains a built-in hack to remove
+# any VPATH assignment not containing ':'
+VPATH = @PATH_IFS@$(top_srcdir)/utils/wxMMedia2/sample # ':' for autoconf
 
-PROGRAM=test_med
+# Clears all default suffixes
+.SUFFIXES:     .o .cpp .c .cxx
 
-OBJECTS=$(PROGRAM).o ../lib/libwxmmedia2.a
+.cpp.o :
+       $(CC) -c $(CPPFLAGS) -o $@ $<
+
+# Set defaults from configure
+include ../../../src/make.env
+
+LDLIBS2 = $(LDLIBS) ../lib/libwxmmedia2.a
+
+all:   test_med test_med3 test_med5 test_med2 test_med4 
+
+test_med:      test_med.o ../../../lib/@WX_TARGET_LIBRARY@
+       $(CC) $(LDFLAGS) -o test_med test_med.o $(LDLIBS2)
+
+test_med2:     test_med2.o ../../../lib/@WX_TARGET_LIBRARY@
+       $(CC) $(LDFLAGS) -o test_med2 test_med2.o $(LDLIBS2)
+
+test_med3:     test_med3.o ../../../lib/@WX_TARGET_LIBRARY@
+       $(CC) $(LDFLAGS) -o test_med3 test_med3.o $(LDLIBS2)
+
+test_med4:     test_med4.o ../../../lib/@WX_TARGET_LIBRARY@
+       $(CC) $(LDFLAGS) -o test_med4 test_med4.o $(LDLIBS2)
+
+test_med5:     test_med5.o ../../../lib/@WX_TARGET_LIBRARY@
+       $(CC) $(LDFLAGS) -o test_med5 test_med5.o $(LDLIBS2)
+
+
+clean:
+       rm -f test_med* core
 
-include $(top_builddir)/src/makeprog.env