annotate libsquish-1.10.patch @ 6:d2e49291986e default tip

Add Linux (x86_64) support to SquishWrapper Also includes rebuild instructions for future
author IBBoard <dev@ibboard.co.uk>
date Sat, 06 Oct 2018 16:45:48 +0100
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 diff -Nau /home/ibboard/temp/squish-1.10/alpha.cpp ./alpha.cpp
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2 --- /home/ibboard/temp/squish-1.10/alpha.cpp 2006-06-29 13:43:24.000000000 +0100
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 +++ ./alpha.cpp 2013-11-30 14:40:56.668747938 +0000
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 @@ -25,6 +25,7 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 #include "alpha.h"
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 #include <algorithm>
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 +#include <limits.h>
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 namespace squish {
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 diff -Nau /home/ibboard/temp/squish-1.10/config ./config
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 --- /home/ibboard/temp/squish-1.10/config 2006-10-01 20:40:09.000000000 +0100
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 +++ ./config 2018-10-06 15:43:13.521557495 +0100
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 @@ -4,10 +4,10 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 USE_ALTIVEC ?= 0
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
17
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
18 # define to 1 to use SSE2 instructions
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
19 -USE_SSE ?= 0
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
20 +USE_SSE ?= 1
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
21
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
22 # default flags
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
23 -CXXFLAGS ?= -O2
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
24 +CXXFLAGS ?= -O2 -fPIC
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
25 ifeq ($(USE_ALTIVEC),1)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
26 CPPFLAGS += -DSQUISH_USE_ALTIVEC=1
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
27 CXXFLAGS += -maltivec
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
28 Common subdirectories: /home/ibboard/temp/squish-1.10/extra and ./extra
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
29 diff -Nau /home/ibboard/temp/squish-1.10/Makefile ./Makefile
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
30 --- /home/ibboard/temp/squish-1.10/Makefile 2006-04-07 18:30:11.000000000 +0100
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
31 +++ ./Makefile 2018-10-06 16:39:32.710493023 +0100
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
32 @@ -5,9 +5,12 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
33
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
34 OBJ = $(SRC:%.cpp=%.o)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
35
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
36 +SO = libsquish.so
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
37 +
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
38 LIB = libsquish.a
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
39
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
40 all : $(LIB)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
41 + $(CXX) $(OBJ) -shared -o $(SO)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
42
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
43 install : $(LIB)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
44 install squish.h $(INSTALL_DIR)/include
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
45 @@ -25,7 +28,7 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
46 $(CXX) $(CPPFLAGS) -I. $(CXXFLAGS) -o$@ -c $<
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
47
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
48 clean :
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
49 - $(RM) $(OBJ) $(LIB)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
50 + $(RM) $(OBJ) $(LIB) $(SO)
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
51
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
52
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
53
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
54 diff -Nau /home/ibboard/temp/squish-1.10/singlecolourfit.cpp ./singlecolourfit.cpp
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
55 --- /home/ibboard/temp/squish-1.10/singlecolourfit.cpp 2007-03-21 19:43:59.000000000 +0000
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
56 +++ ./singlecolourfit.cpp 2013-11-30 14:40:56.670747952 +0000
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
57 @@ -26,6 +26,7 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
58 #include "singlecolourfit.h"
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
59 #include "colourset.h"
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
60 #include "colourblock.h"
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
61 +#include <limits.h>
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
62
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
63 namespace squish {
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
64
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
65 diff -Nau /home/ibboard/temp/squish-1.10/squish.h ./squish.h
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
66 --- /home/ibboard/temp/squish-1.10/squish.h 2007-03-21 20:13:51.000000000 +0000
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
67 +++ ./squish.h 2018-10-06 15:02:57.777805856 +0100
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
68 @@ -214,7 +214,7 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
69 much memory is required in the compressed image, use
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
70 squish::GetStorageRequirements.
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
71 */
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
72 -void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags );
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
73 +extern "C" void CompressImage( u8 const* rgba, int width, int height, void* blocks, int flags );
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
74
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
75 // -----------------------------------------------------------------------------
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
76
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
77 @@ -237,7 +237,7 @@
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
78
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
79 Internally this function calls squish::Decompress for each block.
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
80 */
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
81 -void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags );
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
82 +extern "C" void DecompressImage( u8* rgba, int width, int height, void const* blocks, int flags );
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
83
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
84 // -----------------------------------------------------------------------------
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
85
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
86 Common subdirectories: /home/ibboard/temp/squish-1.10/squish.xcodeproj and ./squish.xcodeproj
d2e49291986e Add Linux (x86_64) support to SquishWrapper
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
87 Common subdirectories: /home/ibboard/temp/squish-1.10/vs7 and ./vs7