Cleaned up Makefile

master
John Jones 2016-11-14 08:11:21 -05:00
parent f57e928cf8
commit 4c3c2a59ed
4 changed files with 11 additions and 4 deletions

1
.gitignore vendored
View File

@ -5,6 +5,7 @@
!**/ !**/
*.o *.o
*.a
.cproject .cproject
.project .project
.settings/language.settings.xml .settings/language.settings.xml

View File

@ -1,6 +1,8 @@
DEBUG=true
CC = gcc CC = gcc
RM = rm -f RM = rm -f
CFLAGS = -fPIC -g -O2 -std=c99 \ CFLAGS = -fPIC -O0 -std=c99 \
-Wall -Wextra -pedantic -Werror \ -Wall -Wextra -pedantic -Werror \
-Wdeclaration-after-statement \ -Wdeclaration-after-statement \
-Wno-format-zero-length \ -Wno-format-zero-length \
@ -10,10 +12,14 @@ CFLAGS = -fPIC -g -O2 -std=c99 \
-Wunused \ -Wunused \
-Wvla -Wvla
ifdef DEBUG
CFLAGS += -g3
endif
LDFLAGS = -g LDFLAGS = -g
LDLIBS = LDLIBS =
TARGET_LIB = mulithash.a TARGET_LIB = libmultihash.a
TARGET_BIN = multihash TARGET_BIN = multihash
SRCS = src/hashes.c src/errors.c src/multihash.c SRCS = src/hashes.c src/errors.c src/multihash.c

View File

@ -44,7 +44,7 @@ int mh_new_length(int code, size_t digest_len);
* @param digest the data within the multihash * @param digest the data within the multihash
* @returns error (if < 0) or 0 * @returns error (if < 0) or 0
*/ */
int mh_new(unsigned char *buffer, int code, const unsigned char *digest, int mh_new(unsigned char* buffer, int code, const unsigned char *digest,
size_t digest_len); size_t digest_len);
#endif /* end of include guard */ #endif /* end of include guard */

View File

@ -117,7 +117,7 @@ int mh_new_length(int code, size_t hash_len) {
* @param digest the data within the multihash * @param digest the data within the multihash
* @returns error (if < 0) or 0 * @returns error (if < 0) or 0
*/ */
int mh_new(unsigned char *buffer, int code, const unsigned char *digest, int mh_new(unsigned char* buffer, int code, const unsigned char *digest,
size_t digest_len) { size_t digest_len) {
if (code & VARINT_MASK) if (code & VARINT_MASK)
return MH_E_VARINT_NOT_SUPPORTED; return MH_E_VARINT_NOT_SUPPORTED;