X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=Makefile;h=3de97354b8be2b3eb7c221ea573630003134b6a6;hp=21e6ad33dc5785665569abfa2c91ff66fc2dcf8e;hb=b511c9aaa5f289596b05743c5b8e40451017129c;hpb=ea783f87082e59a511c4d720d287e0de9fccb1b5 diff --git a/Makefile b/Makefile index 21e6ad33..3de97354 100644 --- a/Makefile +++ b/Makefile @@ -6,8 +6,10 @@ config-host-mak: configure @sed -n "/.*Configured with/s/[^:]*: //p" $@ | sh else config-host.mak: +ifneq ($(MAKECMDGOALS),clean) @echo "Running configure for you..." @./configure +endif all: include config-host.mak endif @@ -15,7 +17,7 @@ endif DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS) OPTFLAGS= -O3 -g -ffast-math -CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) +CFLAGS = -std=gnu99 -Wwrite-strings -Wall -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) LIBS += -lm $(EXTLIBS) PROGS = fio SCRIPTS = fio_generate_plots @@ -32,7 +34,8 @@ SOURCE := gettime.c ioengines.c init.c stat.c log.c time.c filesetup.c \ memalign.c server.c client.c iolog.c backend.c libfio.c flow.c \ cconv.c lib/prio_tree.c json.c lib/zipf.c lib/axmap.c \ lib/lfsr.c gettime-thread.c helpers.c lib/flist_sort.c \ - lib/hweight.c lib/getrusage.c idletime.c + lib/hweight.c lib/getrusage.c idletime.c td_error.c \ + profiles/tiobench.c profiles/act.c io_u_queue.c ifdef CONFIG_64BIT_LLP64 CFLAGS += -DBITS_PER_LONG=32 @@ -76,6 +79,9 @@ endif ifndef CONFIG_STRSEP SOURCE += lib/strsep.c endif +ifndef CONFIG_STRCASESTR + SOURCE += lib/strcasestr.c +endif ifndef CONFIG_GETOPT_LONG_ONLY SOURCE += lib/getopt_long.c endif @@ -85,7 +91,7 @@ endif ifeq ($(CONFIG_TARGET_OS), Linux) SOURCE += diskutil.c fifo.c blktrace.c cgroup.c trim.c engines/sg.c \ - engines/binject.c profiles/tiobench.c + engines/binject.c LIBS += -lpthread -ldl LDFLAGS += -rdynamic endif @@ -173,7 +179,11 @@ ifndef V endif endif -INSTALL = install +ifeq ($(CONFIG_TARGET_OS), SunOS) + INSTALL = ginstall +else + INSTALL = install +endif prefix = /usr/local bindir = $(prefix)/bin @@ -255,7 +265,10 @@ t/lfsr-test: $(T_LFSR_TEST_OBJS) $(QUIET_LINK)$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $(T_LFSR_TEST_OBJS) $(LIBS) $(LDFLAGS) clean: FORCE - -rm -f .depend $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core gfio FIO-VERSION-FILE config-host.mak config-host.h cscope.out *.d + -rm -f .depend $(FIO_OBJS) $(GFIO_OBJS) $(OBJS) $(T_OBJS) $(PROGS) $(T_PROGS) core.* core gfio FIO-VERSION-FILE *.d config-host.mak config-host.h + +distclean: clean FORCE + @rm -f cscope.out cscope: @cscope -b -R