1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 # 22 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 23 # Use is subject to license terms. 24 # 25 26 .KEEP_STATE: 27 28 include ../../Makefile.cmd 29 include ../../Makefile.targ 30 31 SRCS = \ 32 auto_comp.c \ 33 eventgen.c \ 34 fb_avl.c \ 35 fb_localfs.c \ 36 fb_random.c \ 37 fileset.c \ 38 flowop.c \ 39 flowop_library.c \ 40 gamma_dist.c \ 41 ipc.c \ 42 misc.c \ 43 multi_client_sync.c \ 44 procflow.c \ 45 stats.c \ 46 threadflow.c \ 47 utils.c \ 48 vars.c 49 50 PROG = go_filebench 51 ROOTFBBINDIR = $(ROOT)/usr/benchmarks/filebench/bin 52 OBJS = $(SRCS:%.c=%.o) parser_gram.o parser_lex.o 53 LINTFLAGS += -erroff=E_FUNC_ARG_UNUSED -erroff=E_NAME_DEF_NOT_USED2 \ 54 -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_INCONS_ARG_DECL2 55 LINTFLAGS64 += -erroff=E_FUNC_ARG_UNUSED -erroff=E_NAME_DEF_NOT_USED2 \ 56 -erroff=E_NAME_USED_NOT_DEF2 -erroff=E_INCONS_ARG_DECL2 57 58 CERRWARN += -_gcc=-Wno-parentheses 59 CERRWARN += -_gcc=-Wno-unused-variable 60 CERRWARN += -_gcc=-Wno-uninitialized 61 CERRWARN += -_gcc=-Wno-unused-label 62 CERRWARN += -_gcc=-Wno-unused-function 63 64 LINTFILES = $(SRCS:%.c=%.ln) 65 CLEANFILES += parser_gram.c parser_gram.h parser_lex.c y.tab.h y.tab.c 66 67 CPPFLAGS += -I. -I../common 68 CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) 69 CFLAGS64 += $(CCVERBOSE) $(CTF_FLAGS) 70 LDLIBS += -lkstat -lm -ltecla -lsocket -lnsl 71 72 LFLAGS = -t -v 73 YFLAGS = -d 74 75 .PARALLEL: $(OBJS) $(LINTFILES) 76 77 all: $(PROG) 78 79 $(PROG): $(OBJS) 80 $(LINK.c) $(OBJS) -o $@ $(LDLIBS) 81 $(CTFMERGE) -L VERSION -o $@ $(OBJS) 82 $(POST_PROCESS) 83 84 parser_lex.c: ../common/parser_lex.l 85 $(FLEX) $(LFLAGS) ../common/parser_lex.l > $@ 86 87 parser_gram.c: ../common/parser_gram.y 88 $(YACC) $(YFLAGS) ../common/parser_gram.y 89 $(MV) y.tab.c parser_gram.c 90 $(MV) y.tab.h parser_gram.h 91 92 %.o: %.c 93 $(COMPILE.c) $< 94 $(CTFCONVERT_O) 95 96 %.o: ../common/%.c 97 $(COMPILE.c) $< 98 $(CTFCONVERT_O) 99 100 clean: 101 $(RM) $(OBJS) $(LINTFILES) $(CLEANFILES) 102 103 %.ln: ../common/%.c 104 $(LINT.c) -c $< 105 106 lint: $(LINTFILES) 107 $(LINT.c) $(LINTFILES) $(LDLIBS)