INCLUDE := $(BUILD)/include
BIN := $(BUILD)/bin
LIB := $(BIN)
-OBJ := $(BUILD)/obj
+OBJ := $(BUILD)/obj/$(SUBDIR)
DEP := $(OBJ)
DOC := $(BUILD)/doc
LIBRARY_H = $(BASE)/buildlib/library.mak
DEBIANDOC_H = $(BASE)/buildlib/debiandoc.mak
MANPAGE_H = $(BASE)/buildlib/manpage.mak
+PROGRAM_H = $(BASE)/buildlib/program.mak
# Source location control
# SUBDIRS specifies sub components of the module that
# Options
include $(BUILD)/environment.mak
-CPPFLAGS+= -I$(BUILD)/include
+CPPFLAGS+= -I$(INCLUDE)
+LDFLAGS+= -L$(LIB)
# Phony rules. Other things hook these by appending to the dependency
# list
.PHONY: headers library clean veryclean all binary program doc
all: binary doc
binary: library program
-maintainer-clean dist-clean: veryclean
+maintainer-clean dist-clean distclean pristine sanity: veryclean
headers library clean veryclean program:
# Header file control. We want all published interface headers to go
# makedep program that can be called after compiling, that's illistrated
# by the DEPFLAG case.
# Compile rules are expected to call this macro after calling the compiler
- ifdef INLINEDEPFLAG
+ifdef INLINEDEPFLAG
define DoDep
sed -e "1s/.*:/$(subst /,\\/,$@):/" $(basename $(@F)).d > $(DEP)/$(basename $(@F)).d
-rm -f $(basename $(@F)).d