diff --git a/Makefile b/Makefile index 83457c1..3dd073f 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,10 @@ SOURCES := *.cpp PREFIX ?= /usr +ifeq ($(TARGET),win) + override TARGET := windows +endif + ifeq ($(TARGET),) targetmachine := $(shell $(CXX) -dumpmachine) ifneq ($(findstring mingw,$(targetmachine)),) @@ -30,10 +34,6 @@ ifeq ($(TARGET),) endif endif -ifeq ($(TARGET),win) - override TARGET := windows -endif - ifeq ($(TARGET),) uname := $(shell uname -a) ifeq ($(uname),) @@ -79,22 +79,9 @@ endif MOREFLAGS := $(CFLAGS_$(TARGET)) -ifneq ($(DIVSUF),no) - DIVSUF_EXIST := $(lastword $(wildcard libdivsufsort-2*/include/config.h)) - DIVSUF := $(subst /include/config.h,,$(DIVSUF_EXIST)) - ifneq ($(DIVSUF),) - DIVSUF_SOURCES := $(filter-out %/utils.c,$(wildcard $(DIVSUF)/lib/*.c)) - DIVSUF_CFLAGS := -I$(DIVSUF)/include -DHAVE_CONFIG_H -D__STDC_FORMAT_MACROS - DIVSUF_LFLAGS := - MOREFLAGS += $(DIVSUF_CFLAGS) $(DIVSUF_SOURCES) $(DIVSUF_LFLAGS) - else - $(warning no libdivsufsort-2.x detected; switching to fallback libdivsufsort-lite) - $(warning libdivsufsort is approximately 3% faster than lite) - SOURCES += divsufsort.c - endif -else - SOURCES += divsufsort.c -endif +DIVSUF := libdivsufsort-2.0.1 +SOURCES += $(DIVSUF)/lib/divsufsort.c $(DIVSUF)/lib/sssort.c $(DIVSUF)/lib/trsort.c +MOREFLAGS += -I$(DIVSUF)/include -DHAVE_CONFIG_H -D__STDC_FORMAT_MACROS ifeq ($(TARGET),gtk) CFLAGS_G += -fopenmp diff --git a/configure b/configure index 37be2fd..0037151 100755 --- a/configure +++ b/configure @@ -1,12 +1,12 @@ #!/bin/sh -# This script does nothing, other than trick people into running it. -# Since it's usually run before make, and people tend to read its output +# This script does nothing, other than trick people into running it and print the manual. +# Since configure is usually run before make, and people tend to read its output # (to find which dependencies are missing), it's the best place to put compilation instructions. cat < /dev/null +echo 'expected: 0:04.56' + #./special.sh diff --git a/make.sh b/make.sh index 8d3e820..077c24b 100755 --- a/make.sh +++ b/make.sh @@ -41,8 +41,8 @@ if [ $PROFILE = yes ]; then echo 'GTK+ (1/3)' rm obj/* flips; TARGET=gtk make CFLAGS="$FLAGS$LINFLAGS -fprofile-generate -lgcov" || exit $? [ -e flips ] || exit 1 -echo 'GTK+ (2/3)' +echo 'GTK+ (2/3)' # These files are downloaded and extracted from # https://ftp.mozilla.org/pub/firefox/releases/10.0esr/linux-x86_64/en-US/firefox-10.0esr.tar.bz2 # https://ftp.mozilla.org/pub/firefox/releases/17.0esr/linux-x86_64/en-US/firefox-17.0esr.tar.bz2