From 9c02414b0756dc7bcb7c7ddddadceb957d920bdd Mon Sep 17 00:00:00 2001 From: deuce <> Date: Sat, 11 Sep 2004 20:41:30 +0000 Subject: [PATCH] Libs got in LIBODIR, objects go in OBJODIR. Reasoning for this is so you can have xpdev and xpdev-mt libraries in the same location but have their respective object files separate. Don't forget to add $(LIBPREFIX) to library filenames. --- src/smblib/GNUmakefile | 29 +++++++++++++++++++++++++---- src/smblib/objects.mk | 26 +++++++++++++------------- src/smblib/targets.mk | 4 ++-- 3 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/smblib/GNUmakefile b/src/smblib/GNUmakefile index c9d61082f4..1664f455c1 100644 --- a/src/smblib/GNUmakefile +++ b/src/smblib/GNUmakefile @@ -1,6 +1,27 @@ -XPDEV := ../xpdev/ +# smblib/Makefile -include $(XPDEV)Common.gmake -include Common.gmake +######################################################################### +# Makefile for Synchronet Message Base Library (SMBLIB) # +# For use with Borland C++ Builder 5+ or Borland C++ 5.5 for Win32 # +# @format.tab-size 4 # +# # +# usage: make # +######################################################################### + +# $Id$ + +# Macros +#DEBUG = 1 # Comment out for release (non-debug) version + +SRC_ROOT = .. +# Cross platform/compiler definitions +include $(SRC_ROOT)/build/Common.gmake # defines clean and output directory rules + +CFLAGS += -I$(XPDEV_SRC) + +# SMBLIB Library Link Rule +$(SMBLIB): $(OBJS) + @echo Creating $< ... + $(QUIET)ar rc $@ $^ + $(QUIET)ranlib $@ -library: $(SMBLIB_TARGET) diff --git a/src/smblib/objects.mk b/src/smblib/objects.mk index c0ab222fdf..bdf142614f 100644 --- a/src/smblib/objects.mk +++ b/src/smblib/objects.mk @@ -4,17 +4,17 @@ # $Id$ -# LIBODIR, DIRSEP, and OFILE must be pre-defined +# OBJODIR, DIRSEP, and OFILE must be pre-defined -OBJS = $(LIBODIR)$(DIRSEP)smbadd$(OFILE)\ - $(LIBODIR)$(DIRSEP)smballoc$(OFILE)\ - $(LIBODIR)$(DIRSEP)smbdump$(OFILE)\ - $(LIBODIR)$(DIRSEP)smbfile$(OFILE)\ - $(LIBODIR)$(DIRSEP)smbhash$(OFILE)\ - $(LIBODIR)$(DIRSEP)smblib$(OFILE)\ - $(LIBODIR)$(DIRSEP)smbstr$(OFILE)\ - $(LIBODIR)$(DIRSEP)smbtxt$(OFILE)\ - $(LIBODIR)$(DIRSEP)crc16$(OFILE)\ - $(LIBODIR)$(DIRSEP)crc32$(OFILE)\ - $(LIBODIR)$(DIRSEP)md5$(OFILE)\ - $(LIBODIR)$(DIRSEP)lzh$(OFILE) +OBJS = $(OBJODIR)$(DIRSEP)smbadd$(OFILE)\ + $(OBJODIR)$(DIRSEP)smballoc$(OFILE)\ + $(OBJODIR)$(DIRSEP)smbdump$(OFILE)\ + $(OBJODIR)$(DIRSEP)smbfile$(OFILE)\ + $(OBJODIR)$(DIRSEP)smbhash$(OFILE)\ + $(OBJODIR)$(DIRSEP)smblib$(OFILE)\ + $(OBJODIR)$(DIRSEP)smbstr$(OFILE)\ + $(OBJODIR)$(DIRSEP)smbtxt$(OFILE)\ + $(OBJODIR)$(DIRSEP)crc16$(OFILE)\ + $(OBJODIR)$(DIRSEP)crc32$(OFILE)\ + $(OBJODIR)$(DIRSEP)md5$(OFILE)\ + $(OBJODIR)$(DIRSEP)lzh$(OFILE) diff --git a/src/smblib/targets.mk b/src/smblib/targets.mk index a7a9c9cc33..275e3b8e95 100644 --- a/src/smblib/targets.mk +++ b/src/smblib/targets.mk @@ -1,3 +1,3 @@ # smblib/targets.mk -SMBLIB = $(LIBODIR)$(DIRSEP)smb$(LIBFILE) -default: $(LIBODIR) $(SMBLIB) +SMBLIB = $(LIBODIR)$(DIRSEP)$(LIBPREFIX)smb$(LIBFILE) +default: $(OBJODIR) $(LIBODIR) $(SMBLIB) -- GitLab