 .PHONY: liblz4
--- Makefile.inc_orig	2023-10-31 09:26:26.594111444 +0000
+++ Makefile.inc	2023-10-31 09:26:58.272788994 +0000
@@ -79,7 +79,7 @@
   endif
 endif
 
-ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS%,$(shell $(UNAME))))
+ifneq (,$(filter Linux Darwin GNU/kFreeBSD GNU OpenBSD FreeBSD NetBSD DragonFly SunOS Haiku MidnightBSD MINGW% CYGWIN% MSYS% AIX,$(shell $(UNAME))))
 POSIX_ENV = Yes
 else
 POSIX_ENV = No
--- programs/Makefile_orig	2023-10-31 09:30:12.002786047 +0000
+++ programs/Makefile	2023-10-31 09:32:14.323625392 +0000
@@ -174,9 +174,9 @@
 	@echo Installing binaries in $(DESTDIR)$(bindir)
 	$(INSTALL_DIR) $(DESTDIR)$(bindir)/ $(DESTDIR)$(man1dir)/
 	$(INSTALL_PROGRAM) lz4$(EXT) $(DESTDIR)$(bindir)/lz4$(EXT)
-	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
-	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
-	$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
+	@$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4c$(EXT)
+	@$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/lz4cat$(EXT)
+	@$(LN_SF) lz4$(EXT) $(DESTDIR)$(bindir)/unlz4$(EXT)
 	@echo Installing man pages in $(DESTDIR)$(man1dir)
 	$(INSTALL_DATA) lz4.1 $(DESTDIR)$(man1dir)/lz4.1
 	$(LN_SF) lz4.1 $(DESTDIR)$(man1dir)/lz4c.1
--- lib/Makefile_orig	2023-11-03 01:43:24.424147744 +0000
+++ lib/Makefile	2023-11-03 01:41:00.326765933 +0000
@@ -119,11 +119,23 @@
 
 $(LIBLZ4): $(SRCFILES)
 	@echo compiling dynamic library $(LIBVER)
+        ifeq ($(TARGET_OS), AIX)
+	create_exp_file.sh liblz4.a > liblz4.exp
+        ifneq (,$(findstring gcc,$(CC)))
+		$(CC)  $(FLAGS) -shared    liblz4.a -o $@ -Wl,-bE:liblz4.exp -Wl,-bernotok
+        else 
+		$(CC)  ${FLAGS} -qmkshrobj liblz4.a -o $@     -bE:liblz4.exp     -bernotok
+        endif
+	/usr/bin/rm -f liblz4.exp
+	/usr/bin/rm -f liblz4.a
+        endif
 	$(CC) $(FLAGS) -shared $^ -fPIC -fvisibility=hidden $(SONAME_FLAGS) -o $@
 	@echo creating versioned links
 	$(LN_SF) $@ liblz4.$(SHARED_EXT_MAJOR)
 	$(LN_SF) $@ liblz4.$(SHARED_EXT)
-
+        ifeq ($(TARGET_OS), AIX)
+		/usr/bin/ar -q liblz4.a liblz4.$(SHARED_EXT_MAJOR)
+        endif
 endif
 
 .PHONY: liblz4
--- Makefile.inc_orig	2023-11-03 04:36:05.278888443 +0000
+++ Makefile.inc	2023-11-03 04:36:29.390109038 +0000
@@ -1,3 +1,4 @@
+SHELL=/bin/bash
 # ################################################################
 # LZ4 - Makefile common definitions
 # Copyright (C) Yann Collet 2020
