summaryrefslogtreecommitdiffstats
path: root/tools/Makefile
blob: c6c01dca05ca3a5266c72c428cbffb2d0bf97984 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
ROOTDEST    = /export
DEST        = $(ROOTDEST)/Mandrake/mdkinst
RPMS        = $(wildcard $(ROOTDEST)/Mandrake/RPMS/*.rpm)
LOCALFILES  = ddcprobe/ddcxinfos
BASE        = $(ROOTDEST)/Mandrake/base

.PHONY: clean install

all: $(BASE)/depslist $(BASE)/hdlist install

install:
	$(MAKE) gendepslist rpm2header ddcprobe/ddcxinfos
	install make_mdkinst_stage2 gendepslist rpm2header genhdlist $(ROOTDEST)/misc
	install -s $(LOCALFILES) $(DEST)/usr/bin

gendepslist: %: %.cc 
	$(CXX) -I/usr/include/rpm $(CFLAGS) $< -lrpm -ldb1 -lz -o $@

rpm2header: %: %.c
	$(CC) -I/usr/include/rpm $(CFLAGS) $< -lrpm -ldb1 -lz -o $@

ddcprobe/ddcxinfos:
	$(MAKE) -C ddcprobe ddcxinfos

$(BASE)/depslist: $(BASE)/hdlist gendepslist
	./gendepslist -h $@ $<

$(BASE)/hdlist: $(RPMS)
	$(MAKE) install
	./genhdlist $(ROOTDEST)

clean: 
	rm -rf *~ gendepslist rpm2header