#
# Makefile for wxsocket example (UNIX).
-top_srcdir = @top_srcdir@
+top_srcdir = @top_srcdir@/..
top_builddir = ../..
program_dir = samples/sockets
-# 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)/samples/sockets # ':' for autoconf
-# Clears all default suffixes
-.SUFFIXES: .o .cpp .c .cxx
+OBJECTS =$(PROGRAM).o
+DEPFILES=$(PROGRAM).d
-.cpp.o :
- $(CC) -c $(CPPFLAGS) -o $@ $<
+# this target can't be called all
+all-both:
+ $(MAKE) PROGRAM=client all
+ $(MAKE) PROGRAM=server all
-# Set defaults from configure
-include ../../src/make.env
+# this target can't be called clean
+clean-both:
+ $(MAKE) PROGRAM=client clean
+ $(MAKE) PROGRAM=server clean
-all: client@PROGRAM_EXT@ server@PROGRAM_EXT@
-
-client@PROGRAM_EXT@: client.o ../../lib/@WX_TARGET_LIBRARY@
- $(CC) $(LDFLAGS) -o client@PROGRAM_EXT@ client.o $(LDLIBS)
-
-server@PROGRAM_EXT@: server.o ../../lib/@WX_TARGET_LIBRARY@
- $(CC) $(LDFLAGS) -o server@PROGRAM_EXT@ server.o $(LDLIBS)
-
-clean:
- rm -f client@PROGRAM_EXT@ server@PROGRAM_EXT@ client.o server.o core
+include ../../src/makeprog.env
+@IF_GNU_MAKE@-include $(DEPFILES)