blob: b0dff48f45b0a0ff7f1ff789cdb48176a779110f (
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
|
CC = gcc
RANLIB = ranlib
AR = ar
STRIP = strip
ARFLAGS = cr
LDFLAGS =
CFLAGS = -O2 -Wall -Wpointer-arith -Wno-char-subscripts
INCDIR = -I. -I.. -I../build -I../lib -I../misc -I../popt -I../rpmdb -I../rpmio
RPMDIR = ..
prefix = /usr
DESTDIR =
XMLBUILD = rpmxmlbuild
XMLBUILD_SRC = rpmxmlbuild.c
XMLBUILD_OBJ = $(XMLBUILD_SRC:.c=.o)
XMLLIB = libxmlrpm.a
XMLLIB_SRC = xml2rpm.c xmlbuild.c xmlmisc.c xmlparse.c xmlstruct.c xmlverify.c
XMLLIB_H = $(XMLLIB_SRC:.c=.h)
XMLLIB_OBJ = $(XMLLIB_SRC:.c=.o)
LIBS = $(XMLLIB) $(RPMDIR)/build/.libs/librpmbuild.a \
$(RPMDIR)/lib/.libs/librpm.a $(RPMDIR)/rpmdb/.libs/librpmdb.a \
$(RPMDIR)/rpmio/.libs/librpmio.a $(RPMDIR)/popt/.libs/libpopt.a \
$(RPMDIR)/libelf/lib/.libs/libelf.a \
-lz -lexpat -lbz2
LIBDIR = -L. -L$(RPMDIR)/.libs -L/usr/lib
all: $(XMLLIB) $(XMLBUILD)
.c.o:
$(CC) $(CFLAGS) $(INCDIR) -c $?
strip:
$(STRIP) $(XMLBUILD)
install:
@(install -m 755 $(XMLBUILD) $(DESTDIR)$(prefix)/bin)
@(install -m 644 $(XMLLIB) $(DESTDIR)$(prefix)/lib)
@(install -m 644 $(XMLLIB_H) $(DESTDIR)$(prefix)/include/rpm)
$(XMLLIB): $(XMLLIB_OBJ)
$(AR) $(ARFLAGS) $(XMLLIB) $(XMLLIB_OBJ)
$(RANLIB) $(XMLLIB)
$(XMLBUILD): $(XMLLIB) $(XMLBUILD_OBJ)
$(CC) $(LDFLAGS) $(CFLAGS) $(INCDIR) -o $(XMLBUILD) $(XMLBUILD_OBJ) $(LIBS) $(LIBDIR)
clean:
rm -rf $(XMLLIB) $(XMLBUILD) *.o core
|