[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Including dependency files automagically + some basic pilot error
From: |
Angus Leeming |
Subject: |
Including dependency files automagically + some basic pilot error |
Date: |
Mon, 25 Jul 2005 20:04:29 +0100 |
User-agent: |
KNode/0.8.1 |
Makefile.am et al have made me lazy. I come to create a simple makefile for
gnu make and I find I can't :(
Attached is my implementation. There are a number of things wrong with it.
1. I'd like to build the MOCS files before going on to compile the .cpp
ones. However,
srcdir = .
MOCSRCS = foo.h bar.h baz.h
MOCS = $(MOCSRCS:.h=.moc)
.cpp.o: $(MOCS)
command to build .o file
.h.moc:
moc -o $@ $(srcdir)/$<
isn't working. Yes, I'm ignorant of all things vpath.
2. I have, in the past seen some magic to include all the .deps files in a
simple rule, rather than
include ./$(DEPSDIR)/foo.Plo
include ./$(DEPSDIR)/bar.Plo
include ./$(DEPSDIR)/baz.Plo
but I can't for the life of me either remember what it is or find it
through google. Anyway, the simple thing above doesn't work if foo.Plo etc
don't yet exist. Any ideas?
All help accepted most gratefully,
Angus
Makefile
Description: Text document