diff --git a/site_ansto/Makefile b/site_ansto/Makefile index 145ff726..765dcaaf 100644 --- a/site_ansto/Makefile +++ b/site_ansto/Makefile @@ -16,7 +16,8 @@ default: all EXTRA=nintf.o PSI_CLEAN_MATRIX = rm -f ../*.o; $(MAKE) -C ../matrix $(MFLAGS) clean PSI_CFLAGS = -I./ -I$(HDFROOT)/include -DHDF5 -DNXXML\ - -DCYGNUS -DNONINTF -g $(DFORTIFY) -Wall + -DCYGNUS -DNONINTF -g $(DFORTIFY)\ + -Wall -Wextra -Wno-unused PSI_SLIBS = matrix/libmatrix.a PSI_LIBS = -L$(HDFROOT)/lib $(NILIB)\ -ltcl8.4 $(HDFROOT)/lib/libhdf5.a \ @@ -35,7 +36,12 @@ PSI_LIBS = -L$(HDFROOT)/lib $(NILIB)\ # ANSTO rules and variables CC = gcc INCFLAGS = -Ihardsup -I.. -I/opt/gnome/include -CFLAGS = -g $(INCFLAGS) -Wno-unused -Wno-comment -Wno-switch -Wall +# NOTE -std=gnu99 adds c99 support with gnu extensions, it eliminates implicit function warnings +# for c99 functions like roundf. We don't use -std=c99 because it generates compiler errors in +# code modules that use the timeval struct without including sys/time.h, c99 also generates +# implicit function declaration warnings on string functions like strdup. +DEBUGFLAGS = -Wall -Wextra -Wno-unused -Wno-comment -Wno-switch +CFLAGS = -g $(INCFLAGS) $(DEBUGFLAGS) -std=gnu99 HDFROOT=/usr/local SRC = ./../..