libhsakmt - Add make option to package thunk as RPM

Add an option to libhsakmt to allow the thunk to be packaged as an RPM.
The default will remain being built as-is, but this can now be packaged
as an RPM by using "make src rpm" . build_thunk.sh will be modified to
reflect this new option.

Change-Id: I38e03d10cfb5035bdf0a87635a784c47a709a5b6


[ROCm/ROCR-Runtime commit: 6ceed7def3]
This commit is contained in:
Kent Russell
2015-10-28 14:37:11 -04:00
committed by Gerrit Code Review
parent 595f51899f
commit f4889d439d
3 changed files with 43 additions and 3 deletions
+10 -3
View File
@@ -49,13 +49,20 @@ lnx: LDFLAGS += -m32
lnx: $(BUILDDIR)/$(LIB_NAME)
PACKAGE_DIR = $(BUILDDIR)/libhsakmt
INSTALL_DIR = $(PACKAGE_DIR)/usr/lib/x86_64-linux-gnu
INSTALL_DIR_DEB = $(PACKAGE_DIR)/usr/lib/x86_64-linux-gnu
INSTALL_DIR_RPM = $(PACKAGE_DIR)/usr/lib64
deb: lnx64a
@mkdir -p $(INSTALL_DIR)
@cp $(BUILDDIR)/libhsakmt.so* $(INSTALL_DIR)
@mkdir -p $(INSTALL_DIR_DEB)
@cp $(BUILDDIR)/libhsakmt.so* $(INSTALL_DIR_DEB)
@cp -r ../DEBIAN $(PACKAGE_DIR)
@fakeroot dpkg-deb --build $(PACKAGE_DIR) $(BUILDDIR)/libhsakmt.deb
rpm: lnx64a
mkdir -p $(INSTALL_DIR_RPM)
@cp $(BUILDDIR)/libhsakmt.so* $(INSTALL_DIR_RPM)
@rpmbuild --define '_topdir $(BUILD_ROOT)/rpm' -ba $(THUNK_ROOT)/RPM/libhsakmt.spec
lnx64a: $(BUILDDIR)/$(LIB_NAME)
clean: