Makefile.modules
247c2b65
 #
 # $Id$
 #
 # module Makefile
 #(to be included from each module)
 #
404073d3
 MOD_NAME=$(NAME:.so=)
247c2b65
 
779e2405
 # allow placing modules in separate directory apart from ser core
ad1e3e5c
 COREPATH ?=../..
 
 ALLDEP=Makefile $(COREPATH)/Makefile.sources $(COREPATH)/Makefile.rules \
779e2405
  $(COREPATH)/Makefile.modules $(COREPATH)/Makefile.defs
247c2b65
 
3431bcad
 #override modules value, a module cannot have submodules
 override modules=
 override static_modules=
 override static_modules_path=
 
0973fee7
 # should be set in Makefile of apart module
 # INCLUDES += -I$(COREPATH)
3431bcad
 
247c2b65
 ifeq ($(MAKELEVEL), 0)
 # make called directly in the module dir!
 
 $(warning "you should run make from the main ser directory")
4ce32edc
 ifneq ($(makefile_defs), 1)
 $(error "the local makefile does not include Makefile.defs!")
 endif
247c2b65
 
 else
 # called by the main Makefile
 
779e2405
 ALLDEP+=$(COREPATH)/Makefile
247c2b65
 
 endif
 
ad1e3e5c
 include $(COREPATH)/Makefile.sources
247c2b65
 
404073d3
 ifeq (,$(filter $(MOD_NAME), $(static_modules)))
247c2b65
 CFLAGS:=$(MOD_CFLAGS)
 LDFLAGS:=$(MOD_LDFLAGS)
404073d3
 endif
247c2b65
 
ad1e3e5c
 include $(COREPATH)/Makefile.rules