From 74a0c89d268d5accd1e9a52174c9375eb44bb38a Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Wed, 3 May 2017 21:55:55 +1000 Subject: [PATCH] Use the same compat.o and ircsig.o object files for all binaries Neither compat.c nor ircsig.c are compiled different for wserv or scr-bx, so there's no reason these binaries can't just link to the same .o files as the main BitchX binary. This also cleans up the build rules around wserv and scr-bx a little. --- Changelog | 3 +++ Makefile.in | 8 ++++---- source/Makefile.in | 23 ++++++++++------------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Changelog b/Changelog index 03a6d14..c1bbe14 100644 --- a/Changelog +++ b/Changelog @@ -1,5 +1,8 @@ [Changes 1.2.2] +* Use the same compat.o and ircsig.o object files for the wserv and scr-bx + binaries as for the main binary. (caf) + * Simplify handling of /DETACH socket path. (caf) * Remove netfinger client code (no-one is running fingerd anymore) and diff --git a/Makefile.in b/Makefile.in index dc2dd29..43fb1b8 100644 --- a/Makefile.in +++ b/Makefile.in @@ -256,16 +256,16 @@ install_local: all local_installdirs installdll_local $(INSTALL_DATA) $(top_srcdir)/BitchX.kill $(DEFAULT_CTOOLZ_DIR)/$(DEFAULT_BITCHX_KILL_FILE) wserv: - @cd source && $(MAKE) wserv + @cd source && $(MAKE) wserv$(EXEEXT) scr-bx: - @cd source && $(MAKE) scr-bx + @cd source && $(MAKE) scr-bx$(EXEEXT) installwserv: installdirs wserv - $(INSTALL) source/wserv $(DESTDIR)$(INSTALL_WSERV) + $(INSTALL) source/wserv$(EXEEXT) $(DESTDIR)$(INSTALL_WSERV) installscr-bx: installdirs scr-bx - $(INSTALL) source/scr-bx $(DESTDIR)$(INSTALL_SCRBX) + $(INSTALL) source/scr-bx$(EXEEXT) $(DESTDIR)$(INSTALL_SCRBX) installscript: installdirs -@( \ diff --git a/source/Makefile.in b/source/Makefile.in index 97f99f9..dc525d8 100644 --- a/source/Makefile.in +++ b/source/Makefile.in @@ -169,9 +169,12 @@ OBJECTS = alias.o alist.o @ALLOCA@ array.o art.o banlist.o bot_link.o cdcc.o \ translat.o user.o userlist.o vars.o who.o whowas.o window.o words.o \ @X_O@ +WSERV_OBJECTS = wterm.o wnetwork.o ircsig.o compat.o wserv.o +SCRBX_OBJECTS = sterm.o ircsig.o compat.o scr-bx.o + SOURCES = $(OBJECTS:%.o=%.c) #$(TCL_SRCS) -all: $(_VERSION_) wserv scr-bx +all: $(_VERSION_) wserv$(EXEEXT) scr-bx$(EXEEXT) ../include/../.config.h: touch $@ @@ -232,33 +235,27 @@ $(topdir)/source/compat.o: $(top_srcdir)/source/compat.c -c $(top_srcdir)/source/compat.c # wserv -bircsig.o: $(srcdir)/ircsig.c - $(CC) $(CPPFLAGS) $(CFLAGS) -DWTERM_C -c $(srcdir)/ircsig.c -o $@ - -bcompat.o: $(srcdir)/compat.c - $(CC) $(CPPFLAGS) $(CFLAGS) -DWTERM_C -c $(srcdir)/compat.c -o $@ - wterm.o: $(srcdir)/term.c $(CC) $(CPPFLAGS) $(CFLAGS) -DWTERM_C -c $(srcdir)/term.c -o $@ wnetwork.o: $(srcdir)/network.c $(CC) $(CPPFLAGS) $(CFLAGS) -DWTERM_C -c $(srcdir)/network.c -o $@ -wserv: wserv.o wterm.o wnetwork.o bircsig.o bcompat.o - $(CC) $(LDFLAGS) -o wserv$(EXEEXT) wserv.o wterm.o bircsig.o wnetwork.o bcompat.o $(LIBS) +wserv$(EXEEXT): $(WSERV_OBJECTS) + $(CC) $(LDFLAGS) -o wserv$(EXEEXT) $(WSERV_OBJECTS) $(LIBS) clean:: - -$(RM) wserv wserv.o wterm.o wnetwork.o wterm.c wnetwork.c + -$(RM) wserv$(EXEEXT) # scr-bx sterm.o: $(srcdir)/term.c $(CC) $(CPPFLAGS) $(CFLAGS) -DSTERM_C -c $(srcdir)/term.c -o $@ -scr-bx: sterm.o bircsig.o bcompat.o scr-bx.o - $(CC) $(LDFLAGS) -o scr-bx$(EXEEXT) scr-bx.o sterm.o bircsig.o bcompat.o $(LIBS) +scr-bx$(EXEEXT): $(SCRBX_OBJECTS) + $(CC) $(LDFLAGS) -o scr-bx$(EXEEXT) $(SCRBX_OBJECTS) $(LIBS) clean:: - -$(RM) scr-bx$(EXEEXT) scr-bx.o sterm.o sterm.c + -$(RM) scr-bx$(EXEEXT) depend: $(SOURCES) cd $(top_srcdir)/source && \