X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=Makefile;h=781cdec759cef88b2a03ecae617811e5bdba6127;hp=4aa05fab34a73309d9e6918a489661f4b6974309;hb=a0bafb7d88c33b9046073e0bc4af7d64d0caa30b;hpb=d7213923067aa49922962a469a691c3ec951064d diff --git a/Makefile b/Makefile index 4aa05fab..781cdec7 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,3 @@ -DEBUGFLAGS = -D_FORTIFY_SOURCE=2 -DFIO_INC_DEBUG -CPPFLAGS= -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 $(DEBUGFLAGS) -OPTFLAGS= -O3 -g -ffast-math $(EXTFLAGS) -CFLAGS = -std=gnu99 -Wwrite-strings -Wall $(OPTFLAGS) -LIBS = -lm -lz $(EXTLIBS) -PROGS = fio -SCRIPTS = fio_generate_plots - ifneq ($(wildcard config-host.mak),) all: include config-host.mak @@ -20,6 +12,14 @@ all: include config-host.mak 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 -Wdeclaration-after-statement $(OPTFLAGS) $(EXTFLAGS) $(BUILD_CFLAGS) +LIBS += -lm $(EXTLIBS) +PROGS = fio +SCRIPTS = fio_generate_plots + ifdef CONFIG_GFIO PROGS += gfio endif @@ -32,7 +32,7 @@ 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 ifdef CONFIG_64BIT_LLP64 CFLAGS += -DBITS_PER_LONG=32 @@ -76,6 +76,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 @@ -173,7 +176,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 +262,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