Print this page
3748 zfs headers should be C++ compatible
Submitted by:   Justin Gibbs <justing@spectralogic.com>
Submitted by:   Will Andrews <willa@spectralogic.com>
Reviewed by:    Matthew Ahrens <mahrens@delphix.com>


  62 C99LMODE=       -Xc99=%all
  63 
  64 CFLAGS +=       -g $(CCVERBOSE) $(CNOGLOBAL)
  65 CFLAGS64 +=     -g $(CCVERBOSE) $(CNOGLOBAL)
  66 LDLIBS +=       -lcmdutils -lumem -lavl -lnvpair -lz -lc -lsysevent -lmd
  67 CPPFLAGS +=     $(INCS) -DDEBUG
  68 
  69 CERRWARN +=     -_gcc=-Wno-parentheses
  70 CERRWARN +=     -_gcc=-Wno-switch
  71 CERRWARN +=     -_gcc=-Wno-type-limits
  72 CERRWARN +=     -_gcc=-Wno-unused-variable
  73 CERRWARN +=     -_gcc=-Wno-uninitialized
  74 CERRWARN +=     -_gcc=-Wno-empty-body
  75 CERRWARN +=     -_gcc=-Wno-unused-function
  76 CERRWARN +=     -_gcc=-Wno-unused-label
  77 
  78 .KEEP_STATE:
  79 
  80 all: $(LIBS)
  81 


  82 lint: $(LINTLIB)
  83 
  84 include ../../Makefile.targ
  85 
  86 EXTPICS= $(DTRACE_OBJS:%=pics/%)
  87 






  88 pics/%.o: ../../../uts/common/fs/zfs/%.c ../common/zfs.h
  89         $(COMPILE.c) -o $@ $<
  90         $(POST_PROCESS_O)
  91 
  92 pics/%.o: ../../../common/zfs/%.c ../common/zfs.h
  93         $(COMPILE.c) -o $@ $<
  94         $(POST_PROCESS_O)
  95 
  96 pics/%.o: ../common/%.d $(PICS)
  97         $(COMPILE.d) -C -s $< -o $@ $(PICS)
  98         $(POST_PROCESS_O)
  99 
 100 ../common/%.h: ../common/%.d
 101         $(DTRACE) -xnolibs -h -s $< -o $@


  62 C99LMODE=       -Xc99=%all
  63 
  64 CFLAGS +=       -g $(CCVERBOSE) $(CNOGLOBAL)
  65 CFLAGS64 +=     -g $(CCVERBOSE) $(CNOGLOBAL)
  66 LDLIBS +=       -lcmdutils -lumem -lavl -lnvpair -lz -lc -lsysevent -lmd
  67 CPPFLAGS +=     $(INCS) -DDEBUG
  68 
  69 CERRWARN +=     -_gcc=-Wno-parentheses
  70 CERRWARN +=     -_gcc=-Wno-switch
  71 CERRWARN +=     -_gcc=-Wno-type-limits
  72 CERRWARN +=     -_gcc=-Wno-unused-variable
  73 CERRWARN +=     -_gcc=-Wno-uninitialized
  74 CERRWARN +=     -_gcc=-Wno-empty-body
  75 CERRWARN +=     -_gcc=-Wno-unused-function
  76 CERRWARN +=     -_gcc=-Wno-unused-label
  77 
  78 .KEEP_STATE:
  79 
  80 all: $(LIBS)
  81 
  82 $(LIBS): libzpool_hdrck.o
  83 
  84 lint: $(LINTLIB)
  85 
  86 include ../../Makefile.targ
  87 
  88 EXTPICS= $(DTRACE_OBJS:%=pics/%)
  89 
  90 libzpool_hdrck.o: libzpool_hdrck.cpp
  91         $(COMPILE.cc) -DB_FALSE=_B_FALSE -DB_TRUE=_B_TRUE -o $@ $^
  92 
  93 libzpool_hdrck.cpp:
  94         find .. -name '*.[ch]' | xargs grep -h '^#include <' > $@
  95 
  96 pics/%.o: ../../../uts/common/fs/zfs/%.c ../common/zfs.h
  97         $(COMPILE.c) -o $@ $<
  98         $(POST_PROCESS_O)
  99 
 100 pics/%.o: ../../../common/zfs/%.c ../common/zfs.h
 101         $(COMPILE.c) -o $@ $<
 102         $(POST_PROCESS_O)
 103 
 104 pics/%.o: ../common/%.d $(PICS)
 105         $(COMPILE.d) -C -s $< -o $@ $(PICS)
 106         $(POST_PROCESS_O)
 107 
 108 ../common/%.h: ../common/%.d
 109         $(DTRACE) -xnolibs -h -s $< -o $@