blob: 80700a52676e09b31691f101729d9d9b2052b2ef (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
### These are variables meant to be exported
WARNINGS = -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes
DEBUG = -g
OPTS = -O2
CFLAGS = $(WARNINGS) $(DEBUG) $(OPTS) -Ilib -Ibuild -I../lib -I../build
LDFLAGS = $(DEBUG) -Llib -Lbuild -L../lib -L../build
LIBEFENCE = -lefence
LOADLIBES = -lbuild -lrpm -lgdbm -ldb $(LIBEFENCE)
AR = ar r
RANLIB = ranlib
.EXPORT_ALL_VARIABLES:
### End exported variables
# -----------------------------------------------------------------------
SUBDIRS = lib build
OBJS = query.o install.o
PROGS = rpm rpmlead rpmheader rpmarchive
ifeq (.depend,$(wildcard .depend))
TARGET=everything
else
TARGET=depend everything
endif
all: $(TARGET)
rpm: lib/librpm.a
everything: make-subdirs $(PROGS)
make-subdirs:
for d in $(SUBDIRS); do \
(cd $$d; $(MAKE)) ;\
done
$(PROGS): $(OBJS)
clean:
for d in $(SUBDIRS); do \
(cd $$d; $(MAKE) $@) ;\
done
rm -f *.a *.o *~ $(PROGS)
depend:
$(CPP) $(CFLAGS) -M *.c > .depend
for d in $(SUBDIRS); do \
(cd $$d; $(MAKE) $@) ;\
done
ifeq (.depend,$(wildcard .depend))
include .depend
endif
|