Skip to content

Instantly share code, notes, and snippets.

@requnix
Created April 23, 2012 21:40
Show Gist options
  • Save requnix/2474038 to your computer and use it in GitHub Desktop.
Save requnix/2474038 to your computer and use it in GitHub Desktop.
==> make install PREFIX=/usr/local/Cellar/rhash/1.2.9
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations calc_sums.c -o calc_sums.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_print.c -o hash_print.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations common_func.c -o common_func.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_update.c -o hash_update.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations file_mask.c -o file_mask.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations file_set.c -o file_set.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations find_file.c -o find_file.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hash_check.c -o hash_check.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations output.c -o output.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations parse_cmdline.c -o parse_cmdline.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash_main.c -o rhash_main.o
gcc -c -pipe -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations win_utils.c -o win_utils.o
make -C librhash lib-static
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations algorithms.c -o algorithms.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations aich.c -o aich.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations timing.c -o timing.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations byte_order.c -o byte_order.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations plug_openssl.c -o plug_openssl.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations rhash.c -o rhash.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations crc32.c -o crc32.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations util.c -o util.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations ed2k.c -o ed2k.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations edonr.c -o edonr.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations hex.c -o hex.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations md4.c -o md4.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations md5.c -o md5.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha1.c -o sha1.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha256.c -o sha256.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations sha512.c -o sha512.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations ripemd-160.c -o ripemd-160.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations gost.c -o gost.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations has160.c -o has160.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations snefru.c -o snefru.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations tiger.c -o tiger.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations tiger_sbox.c -o tiger_sbox.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations tth.c -o tth.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations torrent.c -o torrent.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations whirlpool.c -o whirlpool.o
gcc -c -pipe -DIN_RHASH -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections -Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith -Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations whirlpool_sbox.c -o whirlpool_sbox.o
ar cqs librhash.a algorithms.o aich.o timing.o byte_order.o plug_openssl.o rhash.o crc32.o util.o ed2k.o edonr.o hex.o md4.o md5.o sha1.o sha256.o sha512.o ripemd-160.o gost.o has160.o snefru.o tiger.o tiger_sbox.o tth.o torrent.o whirlpool.o whirlpool_sbox.o
/usr/bin/ranlib: file: librhash.a(plug_openssl.o) has no symbols
/usr/bin/ranlib: file: librhash.a(util.o) has no symbols
gcc calc_sums.o hash_print.o common_func.o hash_update.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o -o rhash -Llibrhash -lrhash
install -d /usr/local/Cellar/rhash/1.2.9/bin /usr/local/Cellar/rhash/1.2.9/share/man/man1 /etc
install: chmod 755 /etc: Operation not permitted
install -m 755 rhash /usr/local/Cellar/rhash/1.2.9/bin
install -m 644 dist/rhash.1 /usr/local/Cellar/rhash/1.2.9/share/man/man1/rhash.1
sed -e 's/\x0D//g' dist/rhashrc.sample > rhashrc && install -m 644 rhashrc /etc/rhashrc
install: /etc/rhashrc: Permission denied
make: *** [install-program] Error 71
==> Build Environment
CPU: quad-core 64-bit sandybridge
MacOS: 10.7.3-x86_64
Xcode: 4.2.1
CC: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CXX: /usr/bin/llvm-g++ => /usr/llvm-gcc-4.2/bin/llvm-g++-4.2
LD: /usr/bin/llvm-gcc => /usr/llvm-gcc-4.2/bin/llvm-gcc-4.2
CFLAGS: -Os -w -pipe -march=core2 -msse4
CXXFLAGS: -Os -w -pipe -march=core2 -msse4
MAKEFLAGS: -j4
Error: Failed executing: make install PREFIX=/usr/local/Cellar/rhash/1.2.9 (rhash.rb:20)
If `brew doctor' does not help diagnose the issue, please report the bug:
https://github.com/mxcl/homebrew/wiki/reporting-bugs
# Sample usage:
# compile with debug info: make CFLAGS=-g
# compile for pentiumpro: make CFLAGS="-O2 -DNDEBUG -march=i586 -mcpu=pentiumpro -fomit-frame-pointer"
# create rpm with statically linked program: make rpm ADDLDFLAGS="-static -s -Wl,--gc-sections"
CC = gcc
VERSION = 1.2.9
PREFIX = /usr/local
# using OPTFLAGS/OPTLDFLAGS for compatibilty with old scripts using this makefile
OPTFLAGS = -O2 -DNDEBUG -fomit-frame-pointer -ffunction-sections -fdata-sections
OPTLDFLAGS =
CFLAGS = $(OPTFLAGS)
LDFLAGS = $(OPTLDFLAGS)
ADDCFLAGS =
ADDLDFLAGS =
ALLCFLAGS = -pipe $(CFLAGS) $(ADDCFLAGS) \
-Wall -W -Wstrict-prototypes -Wnested-externs -Winline -Wpointer-arith \
-Wbad-function-cast -Wmissing-prototypes -Wmissing-declarations
LDLIBRHASH = -Llibrhash -lrhash
ALLLDFLAGS = $(LDLIBRHASH) $(LDFLAGS) $(ADDLDFLAGS)
SHRDLFLAGS = librhash/librhash.so.0 $(LDFLAGS) $(ADDLDFLAGS)
HEADERS = calc_sums.h hash_print.h common_func.h hash_update.h file_mask.h file_set.h find_file.h hash_check.h output.h parse_cmdline.h rhash_main.h win_utils.h version.h
SOURCES = calc_sums.c hash_print.c common_func.c hash_update.c file_mask.c file_set.c find_file.c hash_check.c output.c parse_cmdline.c rhash_main.c win_utils.c
OBJECTS = calc_sums.o hash_print.o common_func.o hash_update.o file_mask.o file_set.o find_file.o hash_check.o output.o parse_cmdline.o rhash_main.o win_utils.o
OUTDIR =
PROGNAME = rhash
TARGET = $(OUTDIR)$(PROGNAME)
SHARED_TRG = $(TARGET)_shared
SYMLINKS = sfv-hash tiger-hash tth-hash whirlpool-hash has160-hash gost-hash ed2k-link magnet-link
SPECFILE = dist/rhash.spec
LIN_DIST_FILES = Makefile ChangeLog INSTALL COPYING README \
$(SPECFILE) $(SPECFILE).in $(SOURCES) $(HEADERS) tests/test_rhash.sh \
dist/rhash.1 dist/rhash.1.win.sed dist/rhash.1.html
WIN_DIST_FILES = dist/MD5.bat dist/magnet.bat dist/rhashrc.sample
WIN_SRC_FILES = win32/dirent.h win32/stdint.h win32/unistd.h win32/platform-dependent.h \
win32/vc-2010/rhash.vcxproj
LIBRHASH_FILES = librhash/algorithms.c librhash/algorithms.h \
librhash/byte_order.c librhash/byte_order.h librhash/timing.c librhash/timing.h \
librhash/plug_openssl.c librhash/plug_openssl.h librhash/rhash.c librhash/rhash.h \
librhash/aich.c librhash/aich.h librhash/crc32.c librhash/crc32.h \
librhash/ed2k.c librhash/ed2k.h librhash/edonr.c librhash/edonr.h \
librhash/gost.c librhash/gost.h librhash/has160.c librhash/has160.h \
librhash/hex.c librhash/hex.h librhash/md4.c librhash/md4.h librhash/md5.c librhash/md5.h \
librhash/ripemd-160.c librhash/ripemd-160.h librhash/sha1.c librhash/sha1.h \
librhash/sha256.c librhash/sha256.h librhash/sha512.c librhash/sha512.h \
librhash/snefru.c librhash/snefru.h librhash/tiger.c librhash/tiger.h \
librhash/tiger_sbox.c librhash/tth.c librhash/tth.h librhash/whirlpool.c \
librhash/whirlpool.h librhash/whirlpool_sbox.c librhash/test_hashes.c \
librhash/test_hashes.h librhash/torrent.h librhash/torrent.c \
librhash/util.c librhash/util.h librhash/config.h librhash/Makefile
I18N_FILES = po/de.po po/en_AU.po po/es.po po/gl.po po/it.po po/ru.po
DIST_FILES = $(LIN_DIST_FILES) $(LIBRHASH_FILES) $(WIN_DIST_FILES) $(WIN_SRC_FILES) $(I18N_FILES)
WIN_SUFFIX = win32
ARCHIVE_BZIP = rhash-$(VERSION)-src.tar.bz2
ARCHIVE_GZIP = rhash-$(VERSION)-src.tar.gz
ARCHIVE_DEB_GZ = rhash_$(VERSION).orig.tar.gz
ARCHIVE_7Z = rhash-$(VERSION)-src.tar.7z
ARCHIVE_ZIP = rhash-$(VERSION)-$(WIN_SUFFIX).zip
WIN_ZIP_DIR = RHash-$(VERSION)-$(WIN_SUFFIX)
DESTDIR =
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/share/man
LOCALEDIR = $(PREFIX)/share/locale
RPMTOP = rpms
RPMDIRS = SOURCES SPECS BUILD SRPMS RPMS
LIBRHASH = librhash/librhash.a
# Set variables according to GNU coding standard
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
all: $(TARGET)
install: install-program install-symlinks
uninstall: uninstall-program uninstall-symlinks
# creating archives
dist: gzip
gzip: check $(ARCHIVE_GZIP)
bzip: check $(ARCHIVE_BZIP)
dgz: check $(ARCHIVE_DEB_GZ)
7z: check $(ARCHIVE_7Z)
zip : $(ARCHIVE_ZIP)
win-dist: $(ARCHIVE_ZIP)
install-program: all
$(INSTALL) -d $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 $(DESTDIR)/etc
$(INSTALL_PROGRAM) $(TARGET) $(DESTDIR)$(BINDIR)
$(INSTALL_DATA) dist/rhash.1 $(DESTDIR)$(MANDIR)/man1/rhash.1
sed -e 's/\x0D//g' dist/rhashrc.sample > rhashrc && $(INSTALL_DATA) rhashrc $(DESTDIR)/etc/rhashrc
rm -f rhashrc
# dependencies should be properly set, otherwise 'make -j<n>' can run install targets in parallel
install-symlinks: install-program
for f in $(SYMLINKS); do ln -s rhash $(DESTDIR)$(BINDIR)/$$f; done
cd $(DESTDIR)$(MANDIR)/man1 && for f in $(SYMLINKS); do ln -s rhash.1* $$f.1; done
uninstall-program:
rm -f $(DESTDIR)$(BINDIR)/$(PROGNAME)
rm -f $(DESTDIR)$(MANDIR)/man1/rhash.1
uninstall-symlinks:
for f in $(SYMLINKS); do rm -f $(DESTDIR)$(BINDIR)/$$f; done
install-lib-static:
make -C librhash install-lib-static
install-lib-shared:
make -C librhash install-lib-shared
lib-static: $(LIBRHASH)
lib-shared:
make -C librhash lib-shared
test-hashes: test-lib
test-lib:
make -C librhash test
test: $(TARGET) test-lib
chmod +x tests/test_$(PROGNAME).sh
tests/test_$(PROGNAME).sh
test-shared: rhash-shared
make -C librhash test-shared
chmod +x tests/test_$(PROGNAME).sh
LD_LIBRARY_PATH=../librhash tests/test_rhash.sh ./$(SHARED_TRG)
version.h: Makefile
echo "#define VERSION \"$(VERSION)\"" > version.h
bindings/version.properties: Makefile
echo "version=$(VERSION)" > bindings/version.properties
check: version.h bindings/version.properties
# check version
grep -q '\* === Version $(VERSION) ===' ChangeLog
grep -q '^#define VERSION "$(VERSION)"' version.h
[ -s dist/rhash.1.html ]
$(LIBRHASH): $(LIBRHASH_FILES)
make -C librhash lib-static
$(TARGET): $(OBJECTS) $(LIBRHASH)
$(CC) $(OBJECTS) -o $@ $(ALLLDFLAGS)
rhash-shared: $(OBJECTS) lib-shared
$(CC) $(OBJECTS) -o $(SHARED_TRG) $(SHRDLFLAGS)
# NOTE: dependences were generated by 'gcc -Ilibrhash -MM *.c'
# we are using plain old makefile style to support BSD make
calc_sums.o: calc_sums.c common_func.h librhash/util.h librhash/hex.h \
librhash/rhash.h librhash/timing.h parse_cmdline.h rhash_main.h \
file_set.h calc_sums.h hash_check.h hash_print.h output.h win_utils.h \
version.h
$(CC) -c $(ALLCFLAGS) $< -o $@
common_func.o: common_func.c common_func.h librhash/util.h librhash/hex.h \
win_utils.h parse_cmdline.h
$(CC) -c $(ALLCFLAGS) $< -o $@
hash_print.o: hash_print.c common_func.h librhash/util.h librhash/hex.h \
librhash/byte_order.h calc_sums.h librhash/rhash.h hash_check.h \
parse_cmdline.h hash_print.h
$(CC) -c $(ALLCFLAGS) $< -o $@
hash_update.o: hash_update.c common_func.h librhash/util.h \
librhash/timing.h win_utils.h parse_cmdline.h output.h rhash_main.h \
file_set.h calc_sums.h librhash/rhash.h hash_check.h file_mask.h \
hash_update.h
$(CC) -c $(ALLCFLAGS) $< -o $@
file_mask.o: file_mask.c common_func.h librhash/util.h file_mask.h
$(CC) -c $(ALLCFLAGS) $< -o $@
file_set.o: file_set.c librhash/hex.h librhash/crc32.h common_func.h \
librhash/util.h hash_print.h parse_cmdline.h rhash_main.h output.h \
file_set.h calc_sums.h librhash/rhash.h hash_check.h
$(CC) -c $(ALLCFLAGS) $< -o $@
find_file.o: find_file.c common_func.h librhash/util.h win_utils.h \
find_file.h
$(CC) -c $(ALLCFLAGS) $< -o $@
hash_check.o: hash_check.c librhash/hex.h librhash/byte_order.h \
librhash/rhash.h output.h parse_cmdline.h hash_print.h hash_check.h
$(CC) -c $(ALLCFLAGS) $< -o $@
output.o: output.c common_func.h librhash/util.h librhash/rhash.h \
calc_sums.h hash_check.h parse_cmdline.h rhash_main.h output.h
$(CC) -c $(ALLCFLAGS) $< -o $@
parse_cmdline.o: parse_cmdline.c common_func.h librhash/util.h \
librhash/rhash.h librhash/plug_openssl.h win_utils.h file_mask.h \
hash_print.h output.h rhash_main.h version.h parse_cmdline.h
$(CC) -c $(ALLCFLAGS) $< -o $@
rhash_main.o: rhash_main.c common_func.h librhash/util.h \
librhash/timing.h win_utils.h find_file.h file_set.h calc_sums.h \
librhash/rhash.h hash_check.h hash_update.h file_mask.h hash_print.h \
parse_cmdline.h output.h version.h rhash_main.h
$(CC) -c $(ALLCFLAGS) $< -o $@
win_utils.o: win_utils.c common_func.h librhash/util.h parse_cmdline.h \
rhash_main.h win_utils.h
$(CC) -c $(ALLCFLAGS) $< -o $@
dist/rhash.1.win.html: dist/rhash.1 dist/rhash.1.win.sed
sed -f dist/rhash.1.win.sed dist/rhash.1 | rman -fHTML -roff | \
sed -e '/<BODY/s/\(bgcolor=\)"[^"]*"/\1"white"/i' > dist/rhash.1.win.html
# verify the result
grep -q "utf8" dist/rhash.1.win.html
grep -q "APPDATA" dist/rhash.1.win.html
dist/rhash.1.html: dist/rhash.1
-which rman 2>/dev/null && (rman -fHTML -roff dist/rhash.1 | sed -e '/<BODY/s/\(bgcolor=\)"[^"]*"/\1"white"/i' > $@)
dist/rhash.1.txt: dist/rhash.1
-which groff &>/dev/null && (groff -t -e -mandoc -Tascii dist/rhash.1 | sed -e 's/.\[[0-9]*m//g' > $@)
cpp-doc:
cppdoc_cmd -title=RHash -company=Animegorodok -classdir=classdoc -module="cppdoc-standard" -overwrite -extensions="c,h" -languages="c=cpp,h=cpp" -generate-deprecations-list=false $(SOURCES) $(HEADERS) ./Documentation/CppDoc/index.html
permissions:
find . dist librhash po win32 win32/vc-2010 -maxdepth 1 -type f -exec chmod -x '{}' \;
chmod +x tests/test_$(PROGNAME).sh
clean-bindings:
make -C bindings distclean
copy-dist: $(DIST_FILES) permissions
rm -rf $(PROGNAME)-$(VERSION)
mkdir $(PROGNAME)-$(VERSION)
cp -rl --parents $(DIST_FILES) $(PROGNAME)-$(VERSION)/
gzip-rhash: copy-dist
tar czf $(ARCHIVE_GZIP) $(PROGNAME)-$(VERSION)/
rm -rf $(PROGNAME)-$(VERSION)
gzip-bindings:
make -C bindings gzip ARCHIVE_GZIP=../rhash-bindings-$(VERSION)-src.tar.gz
$(ARCHIVE_GZIP): clean-bindings copy-dist
make -C bindings copy-dist COPYDIR=../$(PROGNAME)-$(VERSION)/bindings
tar czf $(ARCHIVE_GZIP) $(PROGNAME)-$(VERSION)/
rm -rf $(PROGNAME)-$(VERSION)
$(ARCHIVE_BZIP): clean-bindings copy-dist
make -C bindings copy-dist COPYDIR=../$(PROGNAME)-$(VERSION)/bindings
tar cjf $(ARCHIVE_BZIP) $(PROGNAME)-$(VERSION)/
rm -rf $(PROGNAME)-$(VERSION)
$(ARCHIVE_7Z): clean-bindings copy-dist
make -C bindings copy-dist COPYDIR=../$(PROGNAME)-$(VERSION)/bindings
tar cf - $(PROGNAME)-$(VERSION)/ | 7zr a -si $(ARCHIVE_7Z)
rm -rf $(PROGNAME)-$(VERSION)
$(ARCHIVE_ZIP): $(WIN_DIST_FILES) dist/rhash.1.win.html
[ -s dist/rhash.1.win.html -a -x $(TARGET) ]
-rm -rf $(WIN_ZIP_DIR)
mkdir $(WIN_ZIP_DIR)
cp $(TARGET).exe ChangeLog $(WIN_DIST_FILES) $(WIN_ZIP_DIR)/
cp dist/rhash.1.win.html $(WIN_ZIP_DIR)/rhash-doc.html
# -[ -f $(OUTDIR)libeay32.dll ] && cp $(OUTDIR)libeay32.dll $(WIN_ZIP_DIR)/
zip -9r $(ARCHIVE_ZIP) $(WIN_ZIP_DIR)
rm -rf $(WIN_ZIP_DIR)
$(ARCHIVE_DEB_GZ) : $(DIST_FILES)
make $(ARCHIVE_GZIP)
mv -f $(ARCHIVE_GZIP) $(ARCHIVE_DEB_GZ)
# rpm packaging
$(SPECFILE): $(SPECFILE).in Makefile
sed -e 's/@VERSION@/$(VERSION)/' $(SPECFILE).in > $(SPECFILE)
rpm: gzip
-for i in $(RPMDIRS); do mkdir -p $(RPMTOP)/$$i; done
cp -f $(ARCHIVE_GZIP) $(RPMTOP)/SOURCES
rpmbuild -ba --clean --define "_topdir `pwd`/$(RPMTOP)" $(SPECFILE)
mv -f `find $(RPMTOP) -name "*rhash*-$(VERSION)*.rpm"` .
rm -rf $(RPMTOP)
distclean: clean
clean:
make -C librhash clean
rm -f *.o $(SHARED_TRG) $(TARGET)
rm -f po/*.gmo po/*.po~
update-po:
xgettext *.c -k_ -cTRANSLATORS -o po/rhash.pot \
--msgid-bugs-address='Aleksey <rhash.admin@gmail.com>' --package-name='RHash'
for f in po/*.po; do \
msgmerge -U $$f po/rhash.pot; \
done
compile-gmo:
for f in po/*.po; do \
g=`basename $$f .po`; \
msgfmt $$f -o po/$$g.gmo; \
done
install-gmo: compile-gmo
for f in po/*.gmo; do \
l=`basename $$f .gmo`; \
$(INSTALL) -d $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES; \
$(INSTALL_DATA) -T $$f $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/rhash.mo; \
done
require 'formula'
# Documentation: https://github.com/mxcl/homebrew/wiki/Formula-Cookbook
# PLEASE REMOVE ALL GENERATED COMMENTS BEFORE SUBMITTING YOUR PULL REQUEST!
class Rhash < Formula
homepage 'http://rhash.anz.ru/'
url 'http://downloads.sourceforge.net/project/rhash/rhash/1.2.9/rhash-1.2.9-src.tar.gz'
md5 '1b4b41709790e715b20b647891cf6211'
# depends_on 'cmake' => :build
def install
# ENV.x11 # if your formula requires any X11 headers
# ENV.j1 # if your formula's build system can't parallelize
# system "./configure", "--disable-debug", "--disable-dependency-tracking",
# "--prefix=#{prefix}"
# system "cmake . #{std_cmake_parameters}"
system "make install PREFIX=#{prefix}" # if this fails, try separate make/make install steps
end
def test
# This test will fail and we won't accept that! It's enough to just replace
# "false" with the main program this formula installs, but it'd be nice if you
# were more thorough. Run the test with `brew test rhash`.
system "false"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment