summaryrefslogtreecommitdiff
path: root/xmlspec/Makefile
blob: a3c789dcdcea8897aa5a9061f82a77280f8902eb (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
G++       = g++
CPPFLAGS  = -O2 -Wall#-D_DEBUG_
PREFIX    = /usr/local
DESTDIR   =
LDFLAGS   =

CPPSRCS = XMLAttrs.cpp XMLChangelog.cpp XMLFiles.cpp XMLMacro.cpp \
          XMLMirror.cpp XMLParser.cpp XMLPackage.cpp XMLRequires.cpp \
          XMLRPMWrap.cpp XMLScript.cpp XMLSource.cpp XMLSpec.cpp \
          xml2spec.cpp
CPPOBJS = $(CPPSRCS:.cpp=.o)
INCS    = -I. -I.. -I../build -I../lib -I../popt -I../rpmio
LIBDIR  = #-L../build/.libs
LIBS    = -lexpat -lrpm -lrpmbuild -lrpmdb -lrpmio -lpopt

all: xml2spec

.SUFFIXES: .cpp .o

.cpp.o:
	$(G++) $(CPPFLAGS) $(INCS) -c $<

xml2spec: $(CPPOBJS)
	$(G++) $(CPPFLAGS) $(LDFLAGS) -o xml2spec $(CPPOBJS) $(LIBDIR) $(LIBS)

test: xml2spec
	@./xml2spec example.spec.xml example.out.spec

clean: clean-xml2spec

clean-xml2spec:
	@rm -rf xml2spec *.o
	@rm -rf example.out.spec
	@rm -rf example.out.xml

install:
	@mkdir -p $(DESTDIR)$(PREFIX)/bin
	@cp xml2spec $(DESTDIR)$(PREFIX)/bin