Skip to content

Commit

Permalink
Changes in Makefile for the package review process in Fedora
Browse files Browse the repository at this point in the history
  • Loading branch information
matejchalk committed Nov 27, 2014
1 parent 956dee5 commit 73ec3c0
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
CFLAGS=-std=c99 -pedantic -Wall -Wextra -fPIC -g -O0
override CFLAGS += -std=c99 -pedantic -Wall -Wextra -fPIC -g -O0
override LDFLAGS += -lz -lbz2 -llzma -lrpm -lrpmio

all: libdrpm.so
all: libdrpm.so.0.0.0

libdrpm.so: drpm.o drpm_read.o drpm_utils.o drpm_compstrm.o
$(CC) $^ -o $@ -shared -Wl,-soname,libdrpm.so -lz -lbz2 -llzma -lrpm -lrpmio
libdrpm.so.0.0.0: drpm.o drpm_read.o drpm_utils.o drpm_compstrm.o
$(CC) $^ -o $@ -shared -Wl,-soname,libdrpm.so.0 $(LDFLAGS)

install:
mkdir -p $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
install -m 755 libdrpm.so.0.0.0 $(DESTDIR)$(libdir)/
install -m 644 drpm.h $(DESTDIR)$(includedir)/
ln -s $(DESTDIR)$(libdir)/libdrpm.so.0.0.0 $(DESTDIR)$(libdir)/libdrpm.so.0
ln -s $(DESTDIR)$(libdir)/libdrpm.so.0 $(DESTDIR)$(libdir)/libdrpm.so

.PHONY: install

clean:
rm -f *.o

0 comments on commit 73ec3c0

Please sign in to comment.