Commit 6a65ec4b authored by deuce's avatar deuce
Browse files

Fix library dependencies in new build system (Untested on Win32)

parent 092ebbff
......@@ -235,7 +235,7 @@ ciolib-mt:
exit
|
$(UIFC_LIB): uifc
$(UIFCLIB): uifc
uifc:
$(COMSPEC) <<|
set VERSION=$(VERSION)
......@@ -247,7 +247,7 @@ uifc:
exit
|
$(UIFC-MT_LIB): uifc-mt
$(UIFCLIB-MT): uifc-mt
uifc-mt:
$(COMSPEC) <<|
set VERSION=$(VERSION)
......
......@@ -344,14 +344,14 @@ $(SMBLIB): smblib
smblib:
$(MAKE) -C $(SMBLIB_SRC) lib
$(CIOLIB-MT_LIB): ciolib-mt
$(CIOLIB-MT): ciolib-mt
ciolib-mt:
$(MAKE) -C $(CIOLIB_SRC) mtlib
$(UIFC_LIB): uifc
$(UIFCLIB): uifc
uifc:
$(MAKE) -C $(UIFC_SRC) lib
$(UIFC-MT_LIB): uifc-mt
uifclib-mt:
$(UIFCLIB-MT): uifc-mt
uifc-mt:
$(MAKE) -C $(UIFC_SRC) mtlib
......@@ -17,7 +17,7 @@ ifeq ($(os),netbsd)
endif
# CIOLIB Library Link Rule
$(CIOLIB-MT): $(MTOBJODIR) $(OBJS)
$(CIOLIB-MT_BUILD): $(MTOBJODIR) $(OBJS)
@echo Creating $@ ...
$(QUIET)ar rc $@ $(OBJS)
$(QUIET)ranlib $@
......@@ -21,7 +21,7 @@ CFLAGS = -DWRAPPER_IMPORTS $(CFLAGS) $(XPDEV-MT_CFLAGS) $(MT_CFLAGS) -I$(CIOLIB_
OBJS = $(OBJS) $(MTOBJODIR)$(DIRSEP)win32cio$(OFILE)
# SBBS DLL Link Rule
$(CIOLIB-MT): $(OBJS)
$(CIOLIB-MT_BUILD): $(OBJS)
@echo Creating $< ...
-$(QUIET)$(DELETE) $@
&$(QUIET)tlib $@ +$**
......
......@@ -1101,7 +1101,7 @@ int find_vmode(int mode)
for (i = 0; i < NUMMODES; i++)
if (vmodelist[i].modenumber == mode)
return i;
return -1;
}
......
# conio/targets.mk
mtlib: $(MTOBJODIR) $(LIBODIR) $(CIOLIB-MT)
CIOLIB-MT_BUILD = $(LIBODIR)$(DIRSEP)$(LIBPREFIX)ciolib_mt$(LIBFILE)
mtlib: $(MTOBJODIR) $(LIBODIR) $(CIOLIB-MT_BUILD)
......@@ -109,32 +109,32 @@ LDFLAGS += $(UIFC-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(SMBLIB_LDFLAGS) $(CIOLIB-MT_
# Monolithic Synchronet executable Build Rule
$(SBBSMONO): $(MONO_OBJS) $(OBJS)
@echo Linking $@
$(QUIET)$(CXX) -o $@ $(LDFLAGS) $(MT_LDFLAGS) $^ $(SMBLIB_LIBS) $(XPDEV-MT_LIBS)
$(QUIET)$(CXX) -o $@ $(LDFLAGS) $(MT_LDFLAGS) $(MONO_OBJS) $(OBJS) $(SMBLIB_LIBS) $(XPDEV-MT_LIBS)
# Synchronet BBS library Link Rule
$(SBBS): $(OBJS) $(LIBS)
@echo Linking $@
$(QUIET)$(MKSHPPLIB) $(LDFLAGS) -o $@ $^ $(SHLIBOPTS)
$(QUIET)$(MKSHPPLIB) $(LDFLAGS) -o $@ $(OBJS) $(LIBS) $(SHLIBOPTS)
# FTP Server Link Rule
$(FTPSRVR): $(MTOBJODIR)/ftpsrvr.o
@echo Linking $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $^ $(SHLIBOPTS) -o $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $(MTOBJODIR)/ftpsrvr.o $(SHLIBOPTS) -o $@
# Mail Server Link Rule
$(MAILSRVR): $(MAIL_OBJS)
@echo Linking $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $^ $(SHLIBOPTS) -o $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $(MAIL_OBJS) $(SHLIBOPTS) -o $@
# Mail Server Link Rule
$(WEBSRVR): $(WEB_OBJS)
@echo Linking $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $^ $(SHLIBOPTS) -o $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $(WEB_OBJS) $(SHLIBOPTS) -o $@
# Services Link Rule
$(SERVICES): $(SERVICE_OBJS)
@echo Linking $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $^ $(SHLIBOPTS) -o $@
$(QUIET)$(MKSHLIB) $(LDFLAGS) $(SERVICE_OBJS) $(SHLIBOPTS) -o $@
# Synchronet Console Build Rule
$(SBBSCON): $(CON_OBJS) $(SBBS) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
......@@ -144,52 +144,52 @@ $(SBBSCON): $(CON_OBJS) $(SBBS) $(FTPSRVR) $(WEBSRVR) $(MAILSRVR) $(SERVICES)
# Baja Utility
$(BAJA): $(BAJA_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(SMBLIB_LIBS) $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(BAJA_OBJS) $(SMBLIB_LIBS) $(XPDEV_LIBS)
# Node Utility
$(NODE): $(NODE_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(NODE_OBJS) $(XPDEV_LIBS)
# FIXSMB Utility
$(FIXSMB): $(FIXSMB_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(SMBLIB_LIBS) $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(FIXSMB_OBJS) $(SMBLIB_LIBS) $(XPDEV_LIBS)
# CHKSMB Utility
$(CHKSMB): $(CHKSMB_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(SMBLIB_LIBS) $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(CHKSMB_OBJS) $(SMBLIB_LIBS) $(XPDEV_LIBS)
# SMB Utility
$(SMBUTIL): $(SMBUTIL_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(SMBLIB_LIBS) $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(SMBUTIL_OBJS) $(SMBLIB_LIBS) $(XPDEV_LIBS)
# SBBSecho (FidoNet Packet Tosser)
$(SBBSECHO): $(SBBSECHO_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(SMBLIB_LIBS) $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(SBBSECHO_OBJS) $(SMBLIB_LIBS) $(XPDEV_LIBS)
# SBBSecho Configuration Program
$(ECHOCFG): $(ECHOCFG_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) $(MT_LDFLAGS) -o $@ $^ $(UIFC-MT_LDFLAGS) $(SMBLIB_LIBS) $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) $(MT_LDFLAGS) -o $@ $(ECHOCFG_OBJS) $(UIFC-MT_LDFLAGS) $(SMBLIB_LIBS) $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
# ADDFILES
$(ADDFILES): $(ADDFILES_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(ADDFILES_OBJS) $(XPDEV_LIBS)
# FILELIST
$(FILELIST): $(FILELIST_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(FILELIST_OBJS) $(XPDEV_LIBS)
# MAKEUSER
$(MAKEUSER): $(MAKEUSER_OBJS)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^ $(XPDEV_LIBS)
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(MAKEUSER_OBJS) $(XPDEV_LIBS)
# JSEXEC
$(JSEXEC): $(JSEXEC_OBJS) $(SBBS)
......@@ -199,9 +199,9 @@ $(JSEXEC): $(JSEXEC_OBJS) $(SBBS)
# ANS2ASC
$(ANS2ASC): $(OBJODIR)/ans2asc.o
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(OBJODIR)/ans2asc.o
# ASC2ANS
$(ASC2ANS): $(OBJODIR)/asc2ans.o
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $^
$(QUIET)$(CC) $(UTIL_LDFLAGS) -o $@ $(OBJODIR)/asc2ans.o
......@@ -8,6 +8,8 @@
SBBSINST = $(EXEODIR)$(DIRSEP)sbbsinst$(EXEFILE)
all: $(EXEODIR) \
all: xpdev-mt ciolib-mt uifc-mt $(EXEODIR) \
$(MTOBJODIR) \
$(SBBSINST)
$(SBBSINST): $(XPDEV-MT_LIB) $(CIOLIB-MT) $(UIFCLIB-MT)
......@@ -18,3 +18,5 @@ all: xpdev-mt \
$(MTOBJODIR) \
$(LIBODIR) \
$(SCFG) $(SCFGHELP)
$(SCFG): $(XPDEV-MT_LIB) $(UIFCLIB-MT) $(CIOLIB-MT)
......@@ -51,3 +51,27 @@ dlls: smblib xpdev-mt \
mono: xpdev-mt smblib \
$(MTOBJODIR) $(EXEODIR) \
$(SBBSMONO)
# Library dependencies
$(SBBS):
$(FTPSRVR):
$(WEBSRVR):
$(MAILSRVR):
$(SERVICES):
$(SBBSCON): $(XPDEV-MT_LIB) $(SMBLIB)
$(SBBSMONO): $(XPDEV-MT_LIB) $(SMBLIB)
$(JSEXEC): $(XPDEV-MT_LIB) $(SMBLIB)
$(NODE): $(XPDEV_LIB)
$(BAJA): $(XPDEV_LIB) $(SMBLIB)
$(FIXSMB): $(XPDEV_LIB) $(SMBLIB)
$(CHKSMB): $(XPDEV_LIB) $(SMBLIB)
$(SMBUTIL): $(XPDEV_LIB) $(SMBLIB)
$(SBBSECHO): $(XPDEV_LIB) $(SMBLIB)
$(ECHOCFG): $(XPDEV-MT_LIB) $(SMBLIB) $(UIFCLIB-MT) $(CIOLIB-MT)
$(ADDFILES): $(XPDEV_LIB)
$(FILELIST): $(XPDEV_LIB)
$(MAKEUSER): $(XPDEV_LIB)
$(ANS2ASC):
$(ASC2ANS):
UEDIT = $(EXEODIR)$(DIRSEP)uedit$(EXEFILE)
all: smblib uifc-mt ciolib-mt xpdev-mt $(MTOBJODIR) $(EXEODIR) $(UEDIT)
$(UEDIT): $(SMBLIB) $(UIFCLIB-MT) $(CIOLIB-MT) $(XPDEV-MT_LIB)
......@@ -25,6 +25,6 @@ vpath %.c ..
CFLAGS += -I.. $(SMBLIB_CFLAGS) $(UIFC-MT_CFLAGS) $(CIOLIB-MT_CFLAGS) $(XPDEV-MT_CFLAGS)
LDFLAGS += $(SMBLIB_LDFLAGS) $(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(MT_LDFLAGS)
$(UMONITOR): ciolib-mt uifc-mt xpdev-mt smblib $(OBJS)
$(UMONITOR): $(OBJS)
@echo Linking $@
@$(CC) $(LDFLAGS) $(OBJS) -o $@ $(SMBLIB_LIBS) $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
$(QUIET)$(CC) $(LDFLAGS) $(OBJS) -o $@ $(SMBLIB_LIBS) $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
UMONITOR = $(EXEODIR)$(DIRSEP)umonitor$(EXEFILE)
all: $(MTOBJODIR) $(EXEODIR) $(UMONITOR)
all: ciolib-mt uifc-mt xpdev-mt smblib $(MTOBJODIR) $(EXEODIR) $(UMONITOR)
$(UMONITOR): $(CIOLIB-MT) $(UIFCLIB-MT) $(XPDEV-MT_LIB) $(SMBLIB)
......@@ -20,17 +20,17 @@ include $(SRC_ROOT)/build/Common.gmake # defines clean and output directory rule
CFLAGS += -DWRAPPER_IMPORTS -I$(XPDEV_SRC) $(CIOLIB-MT_CFLAGS)
# UIFC Library Link Rule
$(UIFCLIB): $(OBJS)
$(UIFCLIB_BUILD): $(OBJS)
@echo Creating $@ ...
$(QUIET)ar rc $@ $(OBJS)
$(QUIET)ranlib $@
# MT-UIFC Library Link Rule
$(UIFCLIB-MT): $(MT_OBJS)
$(UIFCLIB-MT_BUILD): $(MT_OBJS)
@echo Creating $@ ...
$(QUIET)ar rc $@ $(MT_OBJS)
$(QUIET)ranlib $@
$(UIFCTEST): $(MTOBJODIR)$(DIRSEP)uifctest$(OFILE)
@echo Creating $@ ...
$(QUIET)$(CC) $(MT_LDFLAGS) $(UIFC-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(LDFLAGS) -o $@ $^ $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
$(QUIET)$(CC) $(MT_LDFLAGS) $(UIFC-MT_LDFLAGS) $(XPDEV-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(LDFLAGS) -o $@ $(MTOBJODIR)$(DIRSEP)uifctest$(OFILE) $(UIFC-MT_LIBS) $(CIOLIB-MT_LIBS) $(XPDEV-MT_LIBS)
UIFCTEST = $(EXEODIR)$(DIRSEP)uifctest$(EXEFILE)
UIFCLIB_BUILD = $(LIBODIR)$(DIRSEP)$(LIBPREFIX)uifc$(LIBFILE)
UIFCLIB-MT_BUILD = $(LIBODIR)$(DIRSEP)$(LIBPREFIX)uifc_mt$(LIBFILE)
all: lib mtlib test
test: mtlib ciolib-mt xpdev-mt $(EXEODIR) $(UIFCTEST)
test: xpdev-mt ciolib-mt mtlib $(EXEODIR) $(UIFCTEST)
lib: $(OBJODIR) $(LIBODIR) $(UIFCLIB_BUILD)
mtlib: $(MTOBJODIR) $(LIBODIR) $(UIFCLIB-MT_BUILD)
# Library dependencies.
$(UIFCTEST): $(CIOLIB-MT) $(XPDEV-MT_LIB) $(UIFCLIB-MT)
lib: $(OBJODIR) $(LIBODIR) $(UIFCLIB)
mtlib: $(MTOBJODIR) $(LIBODIR) $(UIFCLIB-MT)
......@@ -10,10 +10,10 @@ $(WRAPTEST): $(OBJODIR)/wraptest.o $(DEPS)
@echo Linking $@
$(QUIET)$(CC) $(CFLAGS) -o $@ $(LDFLAGS) $^ $(LIBS)
$(XPDEV_LIB): $(OBJODIR) $(OBJS)
$(XPDEV_LIB_BUILD): $(OBJODIR) $(OBJS)
ar rc $@ $(OBJS)
ranlib $@
$(XPDEV-MT_LIB): $(MTOBJODIR) $(MTOBJS)
$(XPDEV-MT_LIB_BUILD): $(MTOBJODIR) $(MTOBJS)
ar rc $@ $(MTOBJS)
ranlib $@
SRC_ROOT = ..
SRC_ROOT = ..
!include $(SRC_ROOT)/build/Common.bmake
#The following is necessary only when DLL-exporting wrapper functions
#CFLAGS = $(CFLAGS) -DWRAPPER_EXPORTS
$(XPDEV_LIB): $(OBJS)
@echo Creating $< ...
-$(QUIET)$(DELETE) $@
&$(QUIET)tlib $@ +$**
$(XPDEV-MT_LIB): $(MTOBJS)
@echo Creating $< ...
-$(QUIET)$(DELETE) $@
&$(QUIET)tlib $@ +$**
#The following is necessary only when DLL-exporting wrapper functions
#CFLAGS = $(CFLAGS) -DWRAPPER_EXPORTS
$(XPDEV_LIB_BUILD): $(OBJS)
@echo Creating $< ...
-$(QUIET)$(DELETE) $@
&$(QUIET)tlib $@ +$**
$(XPDEV-MT_LIB_BUILD): $(MTOBJS)
@echo Creating $< ...
-$(QUIET)$(DELETE) $@
&$(QUIET)tlib $@ +$**
......@@ -6,10 +6,12 @@
# ODIR, DIRSEP, LIBFILE, EXEFILE, and DELETE must be pre-defined
WRAPTEST = $(EXEODIR)$(DIRSEP)wraptest$(EXEFILE)
WRAPTEST = $(EXEODIR)$(DIRSEP)wraptest$(EXEFILE)
XPDEV_LIB_BUILD = $(LIBODIR)$(DIRSEP)$(LIBPREFIX)xpdev$(LIBFILE)
XPDEV-MT_LIB_BUILD = $(LIBODIR)$(DIRSEP)$(LIBPREFIX)xpdev_mt$(LIBFILE)
all: lib mtlib
lib: $(OBJODIR) $(LIBODIR) $(XPDEV_LIB)
lib: $(OBJODIR) $(LIBODIR) $(XPDEV_LIB_BUILD)
mtlib: $(MTOBJODIR) $(LIBODIR) $(XPDEV-MT_LIB)
mtlib: $(MTOBJODIR) $(LIBODIR) $(XPDEV-MT_LIB_BUILD)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment