Fix newlines

This commit is contained in:
Taro L. Saito 2011-04-06 23:33:32 +09:00
parent b8fb4a28d6
commit da537415e8
2 changed files with 80 additions and 80 deletions

160
Makefile Executable file → Normal file
View File

@ -1,80 +1,80 @@
include Makefile.common include Makefile.common
MVN:=mvn MVN:=mvn
all: snappy all: snappy
SNAPPY_OUT:=$(TARGET)/$(snappy)-$(os_arch) SNAPPY_OUT:=$(TARGET)/$(snappy)-$(os_arch)
SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz SNAPPY_ARCHIVE:=$(TARGET)/snappy-$(VERSION).tar.gz
SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc SNAPPY_CC:=snappy-sinksource.cc snappy-stubs-internal.cc snappy.cc
SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(VERSION) SNAPPY_SRC_DIR:=$(TARGET)/snappy-$(VERSION)
SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC)) SNAPPY_SRC:=$(addprefix $(SNAPPY_SRC_DIR)/,$(SNAPPY_CC))
SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o) SNAPPY_OBJ:=$(addprefix $(SNAPPY_OUT)/,$(patsubst %.cc,%.o,$(SNAPPY_CC)) SnappyNative.o)
SNAPPY_UNPACKED:=$(TARGET)/snappy-extracted.log SNAPPY_UNPACKED:=$(TARGET)/snappy-extracted.log
CXXFLAGS:=$(CXXFLAGS) -I$(SNAPPY_SRC_DIR) CXXFLAGS:=$(CXXFLAGS) -I$(SNAPPY_SRC_DIR)
$(SNAPPY_ARCHIVE): $(SNAPPY_ARCHIVE):
@mkdir -p $(@D) @mkdir -p $(@D)
curl -o$@ http://snappy.googlecode.com/files/snappy-$(VERSION).tar.gz curl -o$@ http://snappy.googlecode.com/files/snappy-$(VERSION).tar.gz
$(SNAPPY_UNPACKED): $(SNAPPY_ARCHIVE) $(SNAPPY_UNPACKED): $(SNAPPY_ARCHIVE)
tar xvfz $< -C $(TARGET) tar xvfz $< -C $(TARGET)
touch $@ touch $@
jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h jni-header: $(SRC)/org/xerial/snappy/SnappyNative.h
$(SRC)/org/xerial/snappy/SnappyNative.h: $(SRC)/org/xerial/snappy/SnappyNative.java $(SRC)/org/xerial/snappy/SnappyNative.h: $(SRC)/org/xerial/snappy/SnappyNative.java
$(JAVAH) -classpath $(TARGET)/classes -o $@ org.xerial.snappy.SnappyNative $(JAVAH) -classpath $(TARGET)/classes -o $@ org.xerial.snappy.SnappyNative
$(SNAPPY_SRC): $(SNAPPY_UNPACKED) $(SNAPPY_SRC): $(SNAPPY_UNPACKED)
$(SNAPPY_OUT)/%.o : $(SNAPPY_SRC_DIR)/%.cc $(SNAPPY_OUT)/%.o : $(SNAPPY_SRC_DIR)/%.cc
@mkdir -p $(@D) @mkdir -p $(@D)
$(CXX) $(CXXFLAGS) -c $< -o $@ $(CXX) $(CXXFLAGS) -c $< -o $@
$(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/org/xerial/snappy/SnappyNative.h $(SNAPPY_OUT)/SnappyNative.o : $(SRC)/org/xerial/snappy/SnappyNative.cpp $(SRC)/org/xerial/snappy/SnappyNative.h
@mkdir -p $(@D) @mkdir -p $(@D)
$(CXX) $(CXXFLAGS) -c $< -o $@ $(CXX) $(CXXFLAGS) -c $< -o $@
$(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ) $(SNAPPY_OUT)/$(LIBNAME): $(SNAPPY_OBJ)
$(CXX) $(CXXFLAGS) $(LINKFLAGS) $+ -o $@ $(CXX) $(CXXFLAGS) $(LINKFLAGS) $+ -o $@
$(STRIP) $@ $(STRIP) $@
clean-native: clean-native:
rm -rf $(SNAPPY_OUT) rm -rf $(SNAPPY_OUT)
clean: clean:
rm -rf $(TARGET) rm -rf $(TARGET)
NATIVE_DIR:=src/main/resources/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH) NATIVE_DIR:=src/main/resources/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH)
NATIVE_TARGET_DIR:=$(TARGET)/classes/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH) NATIVE_TARGET_DIR:=$(TARGET)/classes/org/xerial/snappy/native/$(OS_NAME)/$(OS_ARCH)
NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME) NATIVE_DLL:=$(NATIVE_DIR)/$(LIBNAME)
snappy-jar-version:=snappy-java-$(shell $(JAVA) -jar lib/silk-weaver.jar find 'project(artifactId, version)' pom.xml | grep snappy-java | awk '{ print $$2; }') snappy-jar-version:=snappy-java-$(shell $(JAVA) -jar lib/silk-weaver.jar find 'project(artifactId, version)' pom.xml | grep snappy-java | awk '{ print $$2; }')
native: $(SNAPPY_UNPACKED) $(NATIVE_DLL) native: $(SNAPPY_UNPACKED) $(NATIVE_DLL)
snappy: $(TARGET)/$(snappy-jar-version).jar snappy: $(TARGET)/$(snappy-jar-version).jar
$(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME) $(NATIVE_DLL): $(SNAPPY_OUT)/$(LIBNAME)
@mkdir -p $(@D) @mkdir -p $(@D)
cp $< $@ cp $< $@
@mkdir -p $(NATIVE_TARGET_DIR) @mkdir -p $(NATIVE_TARGET_DIR)
cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME) cp $< $(NATIVE_TARGET_DIR)/$(LIBNAME)
$(TARGET)/$(snappy-jar-version).jar: native $(NATIVE_DLL) $(TARGET)/$(snappy-jar-version).jar: native $(NATIVE_DLL)
$(MVN) package -Dmaven.test.skip=true $(MVN) package -Dmaven.test.skip=true
test: $(NATIVE_DLL) test: $(NATIVE_DLL)
$(MVN) test $(MVN) test
win32: win32:
$(MAKE) native CXX=mingw32-g++ OS_NAME=Windows OS_ARCH=x86 $(MAKE) native CXX=mingw32-g++ OS_NAME=Windows OS_ARCH=x86
mac32: mac32:
$(MAKE) native CXX=g++ OS_NAME=Mac OS_ARCH=i386 $(MAKE) native CXX=g++ OS_NAME=Mac OS_ARCH=i386