Commit 68370ecf authored by rswindell's avatar rswindell
Browse files

Use the get_ctrl_dir() function to get the SBBSCTRL (or default) value.

Use the COPYRIGHT_NOTICE macro rather than the build year.
parent 000791e5
......@@ -18,7 +18,7 @@ SRC_ROOT ?= ${PWD}/..
include $(SRC_ROOT)/build/Common.gmake
UTIL_LDFLAGS := $(LDFLAGS)
UTIL_LDFLAGS += $(SMBLIB_LDFLAGS) $(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV_LDFLAGS)
UTIL_LDFLAGS += $(SMBLIB_LDFLAGS) $(UIFC-MT_LDFLAGS) $(CIOLIB-MT_LDFLAGS) $(XPDEV_LDFLAGS) $(ENCODE_LDFLAGS)
CONSOLE_LDFLAGS += $(LDFLAGS) $(SMBLIB_LDFLAGS) $(XPDEV_LDFLAGS)
UTIL_LIBS += $(HASH_LIBS)
......@@ -188,9 +188,9 @@ $(SBBSECHO): $(SBBSECHO_OBJS)
$(QUIET)$(CC) $(CONSOLE_LDFLAGS) -o $@ $(SBBSECHO_OBJS) $(SMBLIB_LIBS) $(XPDEV_LIBS) $(ENCODE_LIBS) $(HASH_LIBS)
# SBBSecho Configuration Program
$(ECHOCFG): $(ECHOCFG_OBJS)
$(ECHOCFG): $(ECHOCFG_OBJS) $(ENCODE_LIB)
@echo Linking $@
$(QUIET)$(CC) $(UTIL_LDFLAGS) $(MT_LDFLAGS) -o $@ $(ECHOCFG_OBJS) $(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) $(ENCODE_LIBS)
# ADDFILES
$(ADDFILES): $(ADDFILES_OBJS)
......
......@@ -605,8 +605,8 @@ int main(int argc, char **argv)
ZERO_VAR(savarcdef);
ZERO_VAR(savedomain);
fprintf(stderr,"\nSynchronet FidoNet Configuration Version %u.%02u Copyright %s "
"Rob Swindell\n\n",SBBSECHO_VERSION_MAJOR, SBBSECHO_VERSION_MINOR, &__DATE__[7]);
fprintf(stderr,"\nSynchronet FidoNet Configuration Version %u.%02u " COPYRIGHT_NOTICE
"\n\n",SBBSECHO_VERSION_MAJOR, SBBSECHO_VERSION_MINOR);
memset(&cfg,0,sizeof(cfg));
str[0]=0;
......@@ -690,23 +690,12 @@ int main(int argc, char **argv)
SAFECOPY(str,argv[i]);
}
if(str[0]==0) {
p=getenv("SBBSCTRL");
if(!p) {
p=getenv("SBBSNODE");
if(!p) {
goto USAGE;
}
SAFECOPY(str,p);
backslash(str);
SAFECAT(str,"../ctrl/sbbsecho.ini");
}
else {
SAFECOPY(str,p);
backslash(str);
SAFECAT(str,"sbbsecho.ini");
}
SAFECOPY(cfg.cfgfile, get_ctrl_dir());
backslash(cfg.cfgfile);
SAFECAT(cfg.cfgfile, "sbbsecho.ini");
} else {
SAFECOPY(cfg.cfgfile,str);
}
SAFECOPY(cfg.cfgfile,str);
if(!sbbsecho_read_ini(&cfg)) {
fprintf(stderr, "ERROR %d (%s) reading %s\n", errno, strerror(errno), cfg.cfgfile);
......
......@@ -193,9 +193,10 @@ SBBSECHO_OBJS = \
ECHOCFG_OBJS = \
$(MTOBJODIR)$(DIRSEP)echocfg$(OFILE) \
$(MTOBJODIR)$(DIRSEP)rechocfg$(OFILE) \
$(MTOBJODIR)$(DIRSEP)str_util$(OFILE) \
$(UIFC_OBJS) \
$(MTOBJODIR)$(DIRSEP)nopen$(OFILE)
ADDFILES_OBJS = \
$(OBJODIR)$(DIRSEP)addfiles$(OFILE) \
$(OBJODIR)$(DIRSEP)ars$(OFILE) \
......
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