ソースを参照

also install useful demos

Steffen Jaeckel 8 年 前
コミット
3fd1771d35
3 ファイル変更9 行追加3 行削除
  1. 4 2
      makefile
  2. 2 0
      makefile.include
  3. 3 1
      makefile.shared

+ 4 - 2
makefile

@@ -289,14 +289,16 @@ endif
 ifndef NODOCS
 install: library docs
 else
-install: library
+install: library $(USEFUL_DEMOS)
 endif
 	install -d $(LIBPATH)
 	install -d $(INCPATH)
-	install -d $(DATAPATH)
+	install -d $(BINPATH)
 	install -m 644 $(LIBNAME) $(LIBPATH)
 	install -m 644 $(HEADERS) $(INCPATH)
+	install -m 644 $(USEFUL_DEMOS) $(BINPATH)
 ifndef NODOCS
+	install -d $(DATAPATH)
 	install -m 644 doc/crypt.pdf $(DATAPATH)
 endif
 

+ 2 - 0
makefile.include

@@ -96,10 +96,12 @@ TESTS=demos/test.o
 #LIBPATH  The directory for libtomcrypt to be installed to.
 #INCPATH  The directory to install the header files for libtomcrypt.
 #DATAPATH The directory to install the pdf docs.
+#BINPATH  The directory to install the binaries provided.
 DESTDIR  ?= /usr/local
 LIBPATH  ?= $(DESTDIR)/lib
 INCPATH  ?= $(DESTDIR)/include
 DATAPATH ?= $(DESTDIR)/share/doc/libtomcrypt/pdf
+BINPATH  ?= $(DESTDIR)/bin
 
 #Who do we install as?
 ifdef INSTALL_USER

+ 3 - 1
makefile.shared

@@ -234,11 +234,13 @@ $(LIBNAME): $(OBJECTS)
 $(LIBTEST): $(TOBJECTS)
 	$(LT) --mode=link --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) `find ./testprof -type f -name "*.lo"` -o $@ -rpath $(LIBPATH) -version-info $(VERSION_LT)
 
-install: $(LIBNAME)
+install: $(LIBNAME) $(USEFUL_DEMOS)
 	install -d $(LIBPATH)/pkgconfig
 	install -d $(INCPATH)
+	install -d $(BINPATH)
 	$(LT) --mode=install install -c $(LIBNAME) $(LIBPATH)/$(LIBNAME)
 	install -m 644 $(HEADERS) $(INCPATH)
+	install -m 775 $(USEFUL_DEMOS) $(BINPATH)
 	sed -e 's,^prefix=.*,prefix=$(DESTDIR),' -e 's,^Version:.*,Version: $(VERSION),' libtomcrypt.pc.in > $(LIBPATH)/pkgconfig/libtomcrypt.pc
 	install -m 644 libtomcrypt.pc $(LIBPATH)/pkgconfig/libtomcrypt.pc