diff options
author | Thiago Macieira <thiago@macieira.org> | 2013-04-13 09:27:55 -0700 |
---|---|---|
committer | Thiago Macieira <thiago@macieira.org> | 2013-04-23 00:06:32 -0700 |
commit | d773c02bf36f3b09584123bfd0e84a56304b33fb (patch) | |
tree | f12c88fbca226040fafb8e9b44c708e748d82aef /Rules.mk | |
parent | c8b360c3b5fdeb9f878cb5db648a121a10e33772 (diff) | |
download | subsurface-d773c02bf36f3b09584123bfd0e84a56304b33fb.tar.gz |
Add a SOURCES variable to the Makefile, replacing OBJS
Instead of listing objects, let's list sources. This matches also what
qmake and most other buildsystems do. The notable exception is the
kernel.
The reason that listing the sources will be interesting is because I'm
about to add rules to create the dependency files.
Signed-off-by: Thiago Macieira <thiago@macieira.org>
Diffstat (limited to 'Rules.mk')
-rw-r--r-- | Rules.mk | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -19,6 +19,11 @@ PRODVERSION_STRING := $(shell $(GET_VERSION) win $(VERSION_STRING) || \ MSGOBJS=$(addprefix share/locale/,$(MSGLANGS:.po=.UTF-8/LC_MESSAGES/subsurface.mo)) +C_SOURCES = $(filter %.c, $(SOURCES)) +CXX_SOURCES = $(filter %.cpp, $(SOURCES)) +OTHER_SOURCES = $(filter-out %.c %.cpp, $(SOURCES)) +OBJS = $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cpp=.o) $(OTHER_SOURCES) + # Add the objects for the header files which define QObject subclasses HEADERS_NEEDING_MOC += $(shell grep -l -s 'Q_OBJECT' $(HEADERS)) MOC_OBJS = $(HEADERS_NEEDING_MOC:.h=.moc.o) |