summaryrefslogtreecommitdiff
path: root/common.each.mk
diff options
context:
space:
mode:
Diffstat (limited to 'common.each.mk')
-rw-r--r--common.each.mk18
1 files changed, 13 insertions, 5 deletions
diff --git a/common.each.mk b/common.each.mk
index a02f6e5..05f1045 100644
--- a/common.each.mk
+++ b/common.each.mk
@@ -13,15 +13,23 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+dirs := $(dirs)
+
clean_files += .*.mk *.o
ifneq ($(AUTODEPS),)
--include $(wildcard $(objdir)/.*.mk)
+-include $(wildcard $(outdir)/.*.mk)
endif
-$(objdir)/% : $(srcdir)/%.sh
- $(M4) -P $(M4FLAGS) $< | $(INSTALL_PROGRAM) /dev/stdin $@
+$(outdir)/% : $(srcdir)/%.m4
+ $(M4) -P $(M4FLAGS) $< > $@
+
+$(outdir)/% : $(srcdir)/%.sh
+ $(INSTALL_PROGRAM) $< $@
+$(outdir)/% : $(outdir)/%.sh
+ $(INSTALL_PROGRAM) $< $@
-$(objdir)/%.o : $(srcdir)/%.c $(topobjdir)/config.mk
+$(outdir)/%.o : $(srcdir)/%.c $(topoutdir)/config.mk
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
-$(objdir)/%: $(objdir)/%.o
+
+$(outdir)/% : $(outdir)/%.o
$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS)