summaryrefslogtreecommitdiffstats
path: root/tools/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'tools/Makefile')
-rw-r--r--tools/Makefile41
1 files changed, 27 insertions, 14 deletions
diff --git a/tools/Makefile b/tools/Makefile
index c76c5fc6d..375ed0551 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -1,25 +1,38 @@
ROOTDEST = /export
+DEST = $(ROOTDEST)/Mandrake/mdkinst
+RPMS = $(wildcard $(ROOTDEST)/Mandrake/RPMS/*.rpm)
+DIRS = ddcprobe serial_probe
BASE = $(ROOTDEST)/Mandrake/base
+CFLAGS = -Wall
-ALL = gendepslist rpm2header
-.PHONY: clean install
+.PHONY: clean install $(DIRS)
+
+all: $(BASE)/depslist.ordered $(BASE)/filelist $(BASE)/compss $(DIRS) xhost+ install
+
+$(DIRS):
+ make -C $@
install:
- $(MAKE) gendepslist rpm2header
- install make_mdkinst_stage2 gendepslist rpm2header genhdlist $(ROOTDEST)/misc
+ install make_mdkinst_stage2 $(ROOTDEST)/misc
+ cd /usr/bin ; install packdrake $(ROOTDEST)/misc || { echo "packdrake is missing"; exit 1; }
+ cd /usr/bin ; install genbasefiles rpm2header genhdlist_cz2 $(ROOTDEST)/misc || { echo "install rpmtools first!" ; exit 1; }
+ mkdir -p $(DEST)/usr/bin
+
+xhost+: %: %.c
+ $(CC) $(CFLAGS) $< -L/usr/X11R6/lib -lX11 -o $@
-gendepslist: %: %.cc
- $(CXX) -I/usr/include/rpm $(CFLAGS) $< -lrpm -ldb1 -lz -o $@
+ddcprobe/ddcxinfos:
+ $(MAKE) -C ddcprobe ddcxinfos
-rpm2header: %: %.c
- $(CC) -I/usr/include/rpm $(CFLAGS) $< -lrpm -ldb1 -lz -o $@
+$(BASE)/compss $(BASE)/depslist.ordered: $(BASE)/hdlists $(BASE)/hdlist.cz
+ genbasefiles $(BASE) `cat $< | perl -pe 's|^(\S*).*|'$(BASE)'/$$1|' `
-$(BASE)/depslist: $(BASE)/hdlist gendepslist
- ./gendepslist -h $@ $<
+$(BASE)/filelist: $(RPMS)
+# genfilelist $(ROOTDEST)/Mandrake/RPMS* >$@
-$(BASE)/hdlist: $(RPMS)
- $(MAKE) install
- ./genhdlist $(ROOTDEST)
+$(BASE)/hdlist.cz: $(BASE)/hdlists $(RPMS)
+ genhdlists --noclean --distrib $(ROOTDEST)
clean:
- rm -rf *~ gendepslist rpm2header
+ for i in $(DIRS); do $(MAKE) -C $$i clean; done
+ rm -rf *~ xhost+ ddcprobe/ddcxinfos */*.o