diff --git a/Make-linux b/Make-linux index 033ca228..3d500d25 100644 --- a/Make-linux +++ b/Make-linux @@ -25,6 +25,11 @@ CXXOPTIMIZER = -g GLDLIBS = -L/usr/X11R6/lib -lX11 -lXext -lXtst GLDOPTS = -L$(LIBDIR) +# +# binary stuff +# +BINTARGET = $(BINDIR)/$(TARGET) + # # library stuff # diff --git a/Make-solaris b/Make-solaris index 4a78355d..c045f2f5 100644 --- a/Make-solaris +++ b/Make-solaris @@ -26,6 +26,11 @@ CXXOPTIMIZER = -g GLDLIBS = -L$(LIBDIR) -lsocket -lnsl -lposix4 GLDOPTS = -z muldefs +# +# binary stuff +# +BINTARGET = $(BINDIR)/$(TARGET) + # # library stuff # diff --git a/Makecommon b/Makecommon index ad8c1558..a8b27ef1 100644 --- a/Makecommon +++ b/Makecommon @@ -13,7 +13,7 @@ NULL = # target directories # LIBDIR = $(DEPTH)/lib -TARGETDIR = $(DEPTH)/bin +BINDIR = $(DEPTH)/bin # # compiler options diff --git a/client/Makefile b/client/Makefile index e7a6573a..9f0e3579 100644 --- a/client/Makefile +++ b/client/Makefile @@ -4,7 +4,7 @@ include $(DEPTH)/Makecommon # # target file # -TARGETS = client +TARGET = client # # source files @@ -37,8 +37,9 @@ LLDLIBS = \ -lpthread \ $(NULL) -targets: $(TARGETS) +targets: $(BINTARGET) -$(TARGETS): $(OBJECTS) $(DEPLIBS) +$(BINTARGET): $(OBJECTS) $(DEPLIBS) + if test ! -d $(BINDIR); then $(MKDIR) $(BINDIR); fi $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LDFLAGS) diff --git a/server/Makefile b/server/Makefile index b8dd68a3..301adb38 100644 --- a/server/Makefile +++ b/server/Makefile @@ -4,7 +4,7 @@ include $(DEPTH)/Makecommon # # target file # -TARGETS = server +TARGET = server # # source files @@ -40,8 +40,9 @@ LLDLIBS = \ -lpthread \ $(NULL) -targets: $(TARGETS) +targets: $(BINTARGET) -$(TARGETS): $(OBJECTS) $(DEPLIBS) +$(BINTARGET): $(OBJECTS) $(DEPLIBS) + if test ! -d $(BINDIR); then $(MKDIR) $(BINDIR); fi $(CXX) $(CXXFLAGS) -o $@ $(OBJECTS) $(LDFLAGS)