blob: 3e8869cc07ab305e57c0c3dd423ee1631763edec [file] [log] [blame]
# Copyright 2011 Google Inc. All Rights Reserved.
# Author: qianzhang@google.com (ken Zhang)
#MAKEFILE for cross platform
ifdef TARGET
CROSS_PREFIX:=$(TARGET)
DEBUG_CFLAGS= -O3
else
CROSS_PREFIX:=
DEBUG_CFLAGS= -g
endif
CC:=$(CROSS_PREFIX)gcc
LD:=$(CROSS_PREFIX)ld
AR:=$(CROSS_PREFIX)ar
RANLIB:=$(CROSS_PREFIX)ranlib
STRIP:=$(CROSS_PREFIX)strip
CFLAGS= -Wall -fPIC -g
ALL:libfallocate.so
SRC_FILES= fallocate64.c
INC_FILES= fallocate64.h
libfallocate.so:$(SRC_FILES) $(INC_FILES)
$(CC) $(CFLAGS) $(DEBUG_CFLAGS) $(SRC_FILES) -shared -o libfallocate.so
clean:
rm -f libfallocate.so