From 3b8ba3c0dd4e03b68b2ad16e9f4a72ecf72a50a8 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 5 Aug 2014 17:14:07 +0000
Subject: haiku patch


diff --git a/Makefile b/Makefile
index 88c4016..0dfd802 100644
--- a/Makefile
+++ b/Makefile
@@ -76,7 +76,7 @@ clean:
 
 #------------------------------------------------------------------------
 #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU Haiku))
 
 install:
 	@cd $(LZ4DIR); $(MAKE) -e install
diff --git a/lib/Makefile b/lib/Makefile
index 4be1499..25a731d 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -40,7 +40,7 @@ LIBVER=$(LIBVER_MAJOR).$(LIBVER_MINOR).$(LIBVER_PATCH)
 DESTDIR?=
 PREFIX ?= /usr/local
 CFLAGS ?= -O3
-CFLAGS += -I. -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wcast-qual -Wstrict-prototypes -pedantic
+CFLAGS += -I. -Wall -Wundef -Wshadow -Wstrict-prototypes -pedantic
 
 LIBDIR?= $(PREFIX)/lib
 INCLUDEDIR=$(PREFIX)/include
@@ -81,7 +81,7 @@ clean:
 
 #------------------------------------------------------------------------
 #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU Haiku))
 
 liblz4.pc: liblz4.pc.in Makefile
 	@echo creating pkgconfig
diff --git a/programs/Makefile b/programs/Makefile
index 39335db..d346edf 100644
--- a/programs/Makefile
+++ b/programs/Makefile
@@ -39,11 +39,11 @@ RELEASE?= r129
 DESTDIR?=
 PREFIX ?= /usr/local
 CFLAGS ?= -O3
-CFLAGS += -std=c99 -Wall -Wextra -Wundef -Wshadow -Wcast-qual -Wcast-align -Wstrict-prototypes -pedantic -DLZ4_VERSION=\"$(RELEASE)\"
+CFLAGS += -Wall -Wundef -Wshadow -Wstrict-prototypes -pedantic -DLZ4_VERSION=\"$(RELEASE)\"
 FLAGS  := -I../lib $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
 
-BINDIR := $(PREFIX)/bin
-MANDIR := $(PREFIX)/share/man/man1
+#BINDIR := $(PREFIX)/bin
+#MANDIR := $(PREFIX)/share/man/man1
 LZ4DIR := ../lib
 
 
@@ -70,7 +70,7 @@ m32: lz4c32 fullbench32 fuzzer32 frametest32
 
 bins: lz4 lz4c fullbench fuzzer frametest datagen
 
-all: bins m32
+all: bins
 
 lz4: $(LZ4DIR)/lz4.c $(LZ4DIR)/lz4hc.c $(LZ4DIR)/lz4frame.c $(LZ4DIR)/xxhash.c bench.c lz4io.c lz4cli.c
 	$(CC)      $(FLAGS) $^ -o $@$(EXT)
@@ -114,7 +114,7 @@ clean:
 
 #------------------------------------------------------------------------
 #make install is validated only for Linux, OSX, kFreeBSD and Hurd targets
-ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU))
+ifneq (,$(filter $(shell uname),Linux Darwin GNU/kFreeBSD GNU Haiku))
 
 install: lz4 lz4c
 	@echo Installing binaries
-- 
1.8.3.4

