From 96a4f76f2e9dad7fdbd6fd7740de44bc90d5769e Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 18 Dec 2008 16:05:18 -0500 Subject: Unify all common build system parts Rather than duplicating the same thing over and over in every Makefile, move it all to common.mk. Other things fixed here: - doing subdirs in parallel - fix src!=build compiling in subdirs Signed-off-by: Mike Frysinger Signed-off-by: Artem Bityutskiy --- mkfs.ubifs/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'mkfs.ubifs') diff --git a/mkfs.ubifs/Makefile b/mkfs.ubifs/Makefile index 9471ac4..e5bf9ce 100644 --- a/mkfs.ubifs/Makefile +++ b/mkfs.ubifs/Makefile @@ -1,23 +1,23 @@ -DESTDIR := /usr/local -SBINDIR=/usr/sbin ALL_SOURCES=*.[ch] hashtable/*.[ch] -CFLAGS += -Wall -LDLIBS += -lz -llzo2 -lm -luuid + TARGETS = mkfs.ubifs -all: $(TARGETS) +LDLIBS_mkfs.ubifs = -lz -llzo2 -lm -luuid + +include ../common.mk -mkfs.ubifs: crc16.o crc32.o lpt.o compr.o hashtable/hashtable.o \ - hashtable/hashtable_itr.o devtable.o +$(BUILDDIR)/mkfs.ubifs: $(addprefix $(BUILDDIR)/,\ + crc16.o crc32.o lpt.o compr.o devtable.o \ + hashtable/hashtable.o hashtable/hashtable_itr.o) -clean: - rm -f *.o hashtable/*.o $(TARGETS) cscope.* +clean:: + rm -f $(BUILDDIR)/hashtable/*.o cscope.* cscope: @echo $(ALL_SOURCES) > cscope.files @cscope -bR @rm cscope.files -install: ${TARGETS} +install:: ${TARGETS} mkdir -p ${DESTDIR}/${SBINDIR} install -m 0755 ${TARGETS} ${DESTDIR}/${SBINDIR}/ -- cgit v1.2.3