2013-04-16 23:57:27 -04:00
|
|
|
# -*- Mode: Makefile -*-
|
|
|
|
|
|
|
|
.DEFAULT_GOAL=install
|
|
|
|
TOKUROOT=../
|
2013-04-16 23:57:47 -04:00
|
|
|
INCLUDEDIRS=-I. -I$(TOKUROOT)newbrt
|
2013-04-16 23:57:27 -04:00
|
|
|
SKIP_LIBPORTABILITYRULE=1
|
2013-04-16 23:57:37 -04:00
|
|
|
include $(TOKUROOT)toku_include/Makefile.include
|
2013-04-16 23:57:27 -04:00
|
|
|
|
|
|
|
OPT_AROPT=-qnoipo #Disable ipo for lib creation even when optimization is on.
|
|
|
|
|
|
|
|
SRCS = $(wildcard *.c)
|
|
|
|
OBJS = $(patsubst %.c,%.$(OEXT),$(SRCS))
|
2013-04-16 23:57:30 -04:00
|
|
|
TARGET = libtokuportability.$(AEXT)
|
2013-04-16 23:57:27 -04:00
|
|
|
|
2013-04-16 23:57:53 -04:00
|
|
|
build install: $(LIBPORTABILITY) $(PTHREAD_LIB)
|
|
|
|
|
|
|
|
PTHREAD_LIB_CRUNTIME=$(TOKUROOT)windows/lib/$(CRUNTIME)/pthreadVC2.dll
|
|
|
|
$(PTHREAD_LIB): $(PTHREAD_LIB_CRUNTIME)
|
|
|
|
cp -u $< $@
|
2013-04-16 23:57:27 -04:00
|
|
|
|
|
|
|
$(LIBPORTABILITY): $(TARGET)
|
2013-04-16 23:57:53 -04:00
|
|
|
cp -u $< $@
|
2013-04-16 23:57:27 -04:00
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
|
2013-04-16 23:57:44 -04:00
|
|
|
check: $(TARGET)
|
|
|
|
cd tests && $(MAKE) check
|
|
|
|
|
2013-04-16 23:57:27 -04:00
|
|
|
clean:
|
2013-04-16 23:57:53 -04:00
|
|
|
rm -rf $(TARGET) $(LIBPORTABILITY) $(PTHREAD_LIB)
|
2013-04-16 23:57:44 -04:00
|
|
|
cd tests && $(MAKE) clean
|