diff options
Diffstat (limited to 'config.mk')
| -rw-r--r-- | config.mk | 29 |
1 files changed, 21 insertions, 8 deletions
@@ -7,22 +7,35 @@ MANPREFIX = $(PREFIX)/share/man PKG_CONFIG = pkg-config +# compiler and linker +CC ?= /usr/bin/gcc +CXX ?= /usr/bin/g++ + # includes and libs INCS = \ +# dl is for pkfuncinstr LIBS = -lm \ + -ldl \ # flags -# -pedantic +# -rdynamic is for pkfuncinstr SHARED_FLAGS = -D_DEFAULT_SOURCE -D_POSIX_C_SOURCE=200809L \ - -DVERSION=\"$(VERSION)\" -DPK_MEMORY_DEBUGGER -DPK_IMPL_ALL \ + -DVERSION=\"$(VERSION)\" \ + -DPK_MEMORY_DEBUGGER \ + -pedantic \ + -rdynamic \ -CFLAGS += -Wall -Wextra -pedantic $(INCS) $(SHARED_FLAGS) -CXXFLAGS += -Wall -Wextra -pedantic $(INCS) $(SHARED_FLAGS) +CFLAGS += -Wall -Wextra $(INCS) $(SHARED_FLAGS) +CXXFLAGS += -Wall -Wextra $(INCS) $(SHARED_FLAGS) LDFLAGS = $(LIBS) -OPTLEVEL ?= -O3 +# -finstrument-functions is for pkfuncinstr +ifeq ($(CC),/usr/bin/gcc) + CFLAGS += -finstrument-functions +endif +ifeq ($(CXX),/usr/bin/g++) + CXXFLAGS += -finstrument-functions +endif -# compiler and linker -CC ?= /usr/bin/gcc -CXX ?= /usr/bin/g++ +OPTLEVEL ?= -O3 |
