Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
root = true

[*.{h,c}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
insert_final_newline = true

[Makefile]
indent_style = tab
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.exe
src/*.o
src/iqa/.svn
src/iqa/build
Expand All @@ -10,3 +11,4 @@ comparison
comparison.png
test/test.jpg
test/test
.DS_Store
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,17 @@ MAKE ?= make
PREFIX ?= /usr/local

UNAME_S := $(shell uname -s)
LBITS := $(shell getconf LONG_BIT)

ifeq ($(UNAME_S),Linux)
# Linux (e.g. Ubuntu)
MOZJPEG_PREFIX ?= /opt/mozjpeg
CFLAGS += -I$(MOZJPEG_PREFIX)/include
LIBJPEG = $(MOZJPEG_PREFIX)/lib/libjpeg.a
ifeq ($(LBITS),64)
LIBJPEG = $(MOZJPEG_PREFIX)/lib64/libjpeg.a
else
LIBJPEG = $(MOZJPEG_PREFIX)/lib/libjpeg.a
endif
else ifeq ($(UNAME_S),Darwin)
# Mac OS X
MOZJPEG_PREFIX ?= /usr/local/opt/mozjpeg
Expand All @@ -33,7 +38,7 @@ all: jpeg-recompress jpeg-compare jpeg-hash
$(LIBIQA):
cd src/iqa; RELEASE=1 $(MAKE)

jpeg-recompress: jpeg-recompress.c src/util.o src/edit.o src/smallfry.o src/commander.o $(LIBIQA)
jpeg-recompress: jpeg-recompress.c src/util.o src/edit.o src/smallfry.o src/commander.o src/recompress.o $(LIBIQA)
$(CC) $(CFLAGS) -o $@ $^ $(LIBJPEG) $(LDFLAGS)

jpeg-compare: jpeg-compare.c src/util.o src/hash.o src/edit.o src/commander.o src/smallfry.o $(LIBIQA)
Expand Down
Loading