summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-09-10 23:35:30 +0200
committerKay Sievers <kay.sievers@suse.de>2005-09-10 23:35:30 +0200
commit7a526da67da5be9522af02c2c10511a088402356 (patch)
tree482ab82bb18ffe0ea2d18c5979f172e538ff9ed8 /Makefile
parent609435bad66d5b33db367c341ab528239044d346 (diff)
Makefile: fix prerequisits for $(PROGRAMS)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile22
1 files changed, 13 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index 80364c2a7a..07f57519ab 100644
--- a/Makefile
+++ b/Makefile
@@ -60,7 +60,6 @@ HEADERS = \
udev.h \
udev_utils.h \
udev_rules.h \
- udev_version.h \
udev_db.h \
udev_sysfs.h \
logging.h \
@@ -229,19 +228,27 @@ all: $(KLCC) $(PROGRAMS) $(MAN_PAGES)
done;
.PHONY: all
-$(PROGRAMS): $(HOST_PROGS) $(KLCC) $(HEADERS) $(GEN_HEADERS) $(LIBSYSFS) $(LIBUDEV)
- $(QUIET) $(CC) $(CFLAGS) -c -o $@.o $@.c
- $(QUIET) $(LD) $(LDFLAGS) -o $@ $@.o $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
+# clear implicit rules
+.SUFFIXES:
+
+# build the objects
+%.o: %.c
+ $(QUIET) $(CC) -c $(CFLAGS) $< -o $@
+
+# "Static Pattern Rule" to build all programs
+$(PROGRAMS): %: $(HOST_PROGS) $(KLCC) $(HEADERS) $(GEN_HEADERS) $(LIBSYSFS) $(LIBUDEV) %.o
+ $(QUIET) $(LD) $(LDFLAGS) $@.o -o $@ $(LIBUDEV) $(LIBSYSFS) $(LIB_OBJS)
$(QUIET) $(STRIPCMD) $@
-# our own copy of klibc if KLCC is specified it will not be used
+# our own copy of klibc, it is not used if KLCC is given
$(KLCC):
- $(MAKE) -j1 -C klibc KRNLSRC=$(KERNEL_DIR) SUBDIRS=klibc TESTS= \
+ $(MAKE) -C klibc KRNLSRC=$(KERNEL_DIR) SUBDIRS=klibc TESTS= \
SHLIBDIR=$(KLIBC_INSTALL)/lib \
INSTALLDIR=$(KLIBC_INSTALL) \
bindir=$(KLIBC_INSTALL)/bin \
mandir=$(KLIBC_INSTALL)/man all install
-find $(KLIBC_INSTALL)/include -name SCCS -print| xargs rm -rf
+.NOTPARALLEL: $(KLCC)
$(UDEV_OBJS): $(KLCC)
$(LIBUDEV): $(HOST_PROGS) $(HEADERS) $(GEN_HEADERS) $(UDEV_OBJS)
@@ -276,9 +283,6 @@ udev_version.h:
xmlto man $?
.PRECIOUS: %.8
-.c.o:
- $(QUIET) $(CC) $(CFLAGS) -c -o $@ $<
-
ccdv: ccdv.c
@$(HOSTCC) -O1 ccdv.c -o ccdv
.SILENT: ccdv