libdir := ${exec_prefix}/lib
INSTALL := install
-
-LIBFLAGS := -fPIC
+# HACK needed for deps
INCFLAGS := $(addprefix -I, ${INCDIRS})
-LNKFLAGS := -shared -Wl,-soname,${SONAME}
-# setup CXXFLAGS specific to the library target and all prerequisites
-${TARGET}: CXXFLAGS += ${LIBFLAGS}
-ifeq (${BUILD},WIN32)
-${TARGET}: CXXFLAGS += ${OPTFLAGS}
-else
-ifeq (${BUILD},FINAL)
-${TARGET}: CXXFLAGS += ${OPTFLAGS}
-else
-${TARGET}: CXXFLAGS += ${DBGFLAGS}
-endif
-endif
+# add flags specific to the library target and all prerequisites
+${TARGET}: CXXFLAGS += -fPIC
+${TARGET}: INCFLAGS += $(addprefix -I, ${INCDIRS})
+${TARGET}: LNKFLAGS += -shared -Wl,-soname,${SONAME}
+
# lists populated by dir.mk files in subdirectories
SRCS := # := start
WARFLAGS := -Wall -Wextra -pedantic -ansi
CXXFLAGS := ${WARFLAGS}
+ifeq (${BUILD},WIN32)
+ CXXFLAGS += ${OPTFLAGS}
+else
+ifeq (${BUILD},FINAL)
+ CXXFLAGS += ${OPTFLAGS}
+else
+ CXXFLAGS += ${DBGFLAGS}
+endif
+endif
ifeq (${BUILD},WIN32)
CXX := mingw32-g++