6a523e4d23
1. Top (main) makefile defines build configuration variables and export them for sub-makes to use. BAC_ROUTING is defined here - is has been removed from config.h. 2. A new makefile has been added in demo subdirectory. It builds the demo applications. NOTE: the 'ports' target is not build.
57 lines
1.3 KiB
Makefile
57 lines
1.3 KiB
Makefile
# Main Makefile for BACnet-stack project with GCC
|
|
|
|
# tools - only if you need them.
|
|
# Most platforms have this already defined
|
|
# CC = gcc
|
|
# AR = ar
|
|
|
|
# configuration
|
|
BACNET_DEFINES = -DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE
|
|
# for now 1 and 0 are used to build or not to build the routing demo
|
|
BACNET_DEFINES += -DBAC_ROUTING=1
|
|
|
|
#BACDL_DEFINE=-DBACDL_ETHERNET=1
|
|
#BACDL_DEFINE=-DBACDL_ARCNET=1
|
|
#BACDL_DEFINE=-DBACDL_MSTP=1
|
|
BACDL_DEFINE=-DBACDL_BIP=1
|
|
|
|
DEFINES = $(BACNET_DEFINES) $(BACDL_DEFINE) -DWEAK_FUNC=
|
|
|
|
# directories
|
|
BACNET_PORT = linux
|
|
BACNET_PORT_DIR = ../ports/${BACNET_PORT}
|
|
|
|
BACNET_OBJECT = ../demo/object
|
|
BACNET_HANDLER = ../demo/handler
|
|
BACNET_CORE = ../src
|
|
BACNET_INCLUDE = ../include
|
|
# compiler configuration
|
|
#STANDARDS = -std=c99
|
|
INCLUDES = -I$(BACNET_INCLUDE) -I$(BACNET_PORT_DIR) -I$(BACNET_OBJECT) -I$(BACNET_HANDLER)
|
|
OPTIMIZATION = -Os
|
|
DEBUGGING =
|
|
WARNINGS = -Wall -Wmissing-prototypes
|
|
ifeq (${BUILD},debug)
|
|
OPTIMIZATION = -O0
|
|
DEBUGGING = -g -DDEBUG_ENABLED=1
|
|
ifeq (${BACDL_DEFINE},-DBACDL_BIP=1)
|
|
DEFINES += -DBIP_DEBUG
|
|
endif
|
|
endif
|
|
CFLAGS = $(WARNINGS) $(DEBUGGING) $(OPTIMIZATION) $(STANDARDS) $(INCLUDES) $(DEFINES)
|
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
all: library demos
|
|
.PHONY : all library demos clean
|
|
|
|
library:
|
|
$(MAKE) -C lib all
|
|
|
|
demos:
|
|
$(MAKE) -C demo all
|
|
|
|
clean:
|
|
$(MAKE) -C lib clean
|
|
$(MAKE) -C demo clean
|