GNUmakerules 1.4 KB
Newer Older
1 2 3
#
# Insert Copyright Here.
#
4 5 6 7 8 9 10 11 12

# Get rid of a bunch of nasty built-in implicit rules,
# to avoid bogus circular dependencies and make things go faster.
# Use the `-r' command line option to make to get even better performance.
.SUFFIXES:

#
# Various install targets.
# 
13 14 15
$(INSTALL_BINDIR)/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_BINDIR)
16
	$(INSTALL_PROGRAM) $< $@
17

18 19 20 21 22
$(INSTALL_SBINDIR)/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_SBINDIR)
	$(INSTALL_PROGRAM) $< $@

23
$(INSTALL_LIBDIR)/%: %
24
	@echo "Installing $<"
25
	-mkdir -p $(INSTALL_LIBDIR)
26
	$(INSTALL_PROGRAM) $< $@
27

28
$(INSTALL_LIBEXECDIR)/%: %
29
	@echo "Installing $<"
30
	-mkdir -p $(INSTALL_LIBEXECDIR)
31
	$(INSTALL_PROGRAM) $< $@
32

33 34 35 36 37 38 39 40 41 42
$(INSTALL_ETCDIR)/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_ETCDIR)
	$(INSTALL_DATA) $< $@

$(INSTALL_WWWDIR)/%: %
	@echo "Installing $<"
	-mkdir -p $(INSTALL_WWWDIR)
	$(INSTALL_DATA) $< $@

43 44
CFLAGS += $(LOCALCFLAGS)

45 46 47
clean:

distclean: clean
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
	rm -f GNUmakefile

#
# Where to find source files.
# Using specific patterns instead of the catch-all VPATH variable
# avoids hitting miscellaneous wrong targets in other directories
# when configuring in the source directory.
#
vpath %.in $(SRCDIR)
vpath %.c $(SRCDIR)

#
# Define rules which we blew away with .SUFFIXES
# 
%.o: %.c
	$(CC) -c -o $@ $(CFLAGS) $<

#
# Rules to regen configure written files.
#
%: %.in
	@echo "Regenerating $@"
	cd $(OBJDIR) && CONFIG_FILES=$(SUBDIR)/$@ config.status