unix Makefile.src and hints

Change the handling for windowing system specific files so that
when building for more than one set, each gets compiled as a set
instead of some being interspersed among rival window systems.
Put differently, handle tile.o specially so that there's no need
for the hints to sort the WINOBJ list in order to avoid tile.o
duplication.

So the order of compilation is
  common source files
  unix-specific files
  tty files
  curses files
  X11 files
  Qt files
  tile.c (if applicable), version.c, date.c

Previously, some of the X11 files were scattered around among the
others because of the spelling of their file names.

Only matters if you're watching the progress of a build.
This commit is contained in:
PatR
2022-09-18 14:25:33 -07:00
parent 2368c59f69
commit 4de71302a3
4 changed files with 26 additions and 15 deletions

View File

@@ -235,17 +235,19 @@ ifdef WANT_WIN_QT
LINK = $(CXX)
ifdef WANT_WIN_QT5
# Qt5 requires C++11
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags))
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)
QTCXXFLAGS += $(sort $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig \
pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --cflags))
WINLIB += $(shell PKG_CONFIG_PATH=$(QTDIR)/lib/pkgconfig \
pkg-config Qt5Gui Qt5Widgets Qt5Multimedia --libs)
endif # WANT_WIN_QT5
ifdef WANT_WIN_QT6
QTCXXFLAGS += -std=c++17 -I $(QTDIR)/include -I $(QTDIR)/include/QtCore -I $(QTDIR)/include/QtMultimedia
QTCXXFLAGS += -std=c++17 -I $(QTDIR)/include -I $(QTDIR)/include/QtCore \
-I $(QTDIR)/include/QtMultimedia
MOC = moc
MOCPATH = $(QTDIR)/share/qt/libexec/moc
WINLIB += -F $(QTDIR)/Frameworks -framework QtCore -framework QtGui -framework QtWidgets -framework QtMultimedia
WINLIB += -F $(QTDIR)/Frameworks -framework QtCore -framework QtGui \
-framework QtWidgets -framework QtMultimedia
endif # WANT_WIN_QT6
WINSRC += $(WINQTSRC)
WINOBJ0 += $(WINQTOBJ)
VARDATND0 += nhtiles.bmp rip.xpm nhsplash.xpm
# XXX if /Developer/qt exists and QTDIR not set, use that
ifndef QTDIR
@@ -257,7 +259,7 @@ LINK=$(CC)
endif # !WANT_WIN_QT
# prevent duplicate tile.o in WINOBJ
WINOBJ = $(sort $(WINOBJ0))
WINOBJ = $(WINOBJ0) $(sort $(XTRAOBJ))
# prevent duplicates in VARDATND if both X11 and Qt are being supported
VARDATND += $(sort $(VARDATND0))