Skip to content

Commit

Permalink
update add compile switch for bac objects ai,ao,..
Browse files Browse the repository at this point in the history
  • Loading branch information
stargieg committed Oct 30, 2016
1 parent f3c7783 commit 1b4cb0e
Show file tree
Hide file tree
Showing 55 changed files with 17,790 additions and 2,923 deletions.
108 changes: 81 additions & 27 deletions demo/gateway/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,35 +9,90 @@ TARGET = bacgateway

TARGET_BIN = ${TARGET}$(TARGET_EXT)

# put any overloaded or special built src files here,
# so the linker uses these instead of the functions in the library
SRCS = main.c \
SRC = main.c \
$(BACNET_OBJECT)/gw_device.c \
$(BACNET_HANDLER)/h_routed_npdu.c \
$(BACNET_HANDLER)/s_router.c \
$(BACNET_OBJECT)/device.c \
$(BACNET_OBJECT)/ai.c \
$(BACNET_OBJECT)/ao.c \
$(BACNET_OBJECT)/av.c \
$(BACNET_OBJECT)/bi.c \
$(BACNET_OBJECT)/bo.c \
$(BACNET_OBJECT)/bv.c \
$(BACNET_OBJECT)/channel.c \
$(BACNET_OBJECT)/command.c \
$(BACNET_OBJECT)/csv.c \
$(BACNET_OBJECT)/iv.c \
$(BACNET_OBJECT)/lc.c \
$(BACNET_OBJECT)/lo.c \
$(BACNET_OBJECT)/lsp.c \
$(BACNET_OBJECT)/ms-input.c \
$(BACNET_OBJECT)/mso.c \
$(BACNET_OBJECT)/msv.c \
$(BACNET_OBJECT)/nc.c \
$(BACNET_OBJECT)/osv.c \
$(BACNET_OBJECT)/piv.c \
$(BACNET_OBJECT)/schedule.c \
$(BACNET_OBJECT)/trendlog.c \
$(BACNET_OBJECT)/bacfile.c
$(BACNET_OBJECT)/device.c

# put any overloaded or special built src files here,
# so the linker uses these instead of the functions in the library
OBJECT_SRC =
ifneq (,$(findstring -DAI,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/ai.c
endif
ifneq (,$(findstring -DAO,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/ao.c
endif
ifneq (,$(findstring -DAV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/av.c
endif
ifneq (,$(findstring -DBI,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/bi.c
endif
ifneq (,$(findstring -DBO,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/bo.c
endif
ifneq (,$(findstring -DBV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/bv.c
endif
ifneq (,$(findstring -DCHANNEL,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/channel.c
endif
ifneq (,$(findstring -DCOMMAND,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/command.c
endif
ifneq (,$(findstring -DCSV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/csv.c
endif
ifneq (,$(findstring -DIV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/iv.c
endif
ifneq (,$(findstring -DLC,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/lc.c
endif
ifneq (,$(findstring -DLO,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/lo.c
endif
ifneq (,$(findstring -DLSP,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/lsp.c
endif
ifneq (,$(findstring -DMSI,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/msi.c
endif
ifneq (,$(findstring -DMSO,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/mso.c
endif
ifneq (,$(findstring -DMSV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/msv.c
endif
ifneq (,$(findstring -DOSV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/osv.c
endif
ifneq (,$(findstring -DPIV,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/piv.c
endif
ifneq (,$(findstring -DINTRINSIC_REPORTING,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/nc.c
endif
ifneq (,$(findstring -DTRENDLOG,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/trendlog.c
endif
ifneq (,$(findstring -DSCHEDULE,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/schedule.c
endif
OBJECT_SRC += $(BACNET_OBJECT)/access_credential.c \
$(BACNET_OBJECT)/access_door.c \
$(BACNET_OBJECT)/access_point.c \
$(BACNET_OBJECT)/access_rights.c \
$(BACNET_OBJECT)/access_user.c \
$(BACNET_OBJECT)/access_zone.c \
$(BACNET_OBJECT)/credential_data_input.c
ifneq (,$(findstring -DBACFILE,$(BACNET_DEFINES)))
OBJECT_SRC += $(BACNET_OBJECT)/bacfile.c
endif

SRCS = ${SRC} ${OBJECT_SRC}

OBJS = ${SRCS:.c=.o}

Expand Down Expand Up @@ -68,4 +123,3 @@ clean:
rm -f core ${TARGET_BIN} ${OBJS} ${BACNET_LIB_TARGET} $(TARGET).map

include: .depend

2 changes: 2 additions & 0 deletions demo/gateway/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,9 @@ int main(
bvlc_maintenance_timer(elapsed_seconds);
#endif
dlenv_maintenance_timer(elapsed_seconds);
#if defined(LC)
Load_Control_State_Machine_Handler();
#endif
elapsed_milliseconds = elapsed_seconds * 1000;
tsm_timer_milliseconds(elapsed_milliseconds);
}
Expand Down
Loading

0 comments on commit 1b4cb0e

Please sign in to comment.