Fixed Makefile for MinGW build. Testing with MinGW 20101030 and MSYS. gcc (GCC) 4.5.0 (MinGW), GNU Make 3.81 (MSYS).
This commit is contained in:
@@ -4,6 +4,10 @@
|
|||||||
# Most platforms have this already defined
|
# Most platforms have this already defined
|
||||||
# CC = gcc
|
# CC = gcc
|
||||||
# AR = ar
|
# AR = ar
|
||||||
|
# MAKE = make
|
||||||
|
# SIZE = size
|
||||||
|
#
|
||||||
|
# Assumes rm and cp are available
|
||||||
|
|
||||||
# configuration
|
# configuration
|
||||||
# If BACNET_DEFINES has not already been set, configure to your needs here
|
# If BACNET_DEFINES has not already been set, configure to your needs here
|
||||||
@@ -71,5 +75,3 @@ bdk-atxx4-mstp: ports/bdk-atxx4-mstp/Makefile
|
|||||||
clean:
|
clean:
|
||||||
$(MAKE) -C lib clean
|
$(MAKE) -C lib clean
|
||||||
$(MAKE) -C demo clean
|
$(MAKE) -C demo clean
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
@echo off
|
@echo off
|
||||||
echo Build with MinGW: mingw.sourceforge.net
|
echo Build with MinGW and MSYS: mingw.sourceforge.net
|
||||||
echo and Yagarto Tools: www.yagarto.de
|
rem set PATH=C:\MinGW\msys\1.0\bin;C:\MinGW\bin
|
||||||
set CC=gcc
|
set CC=gcc
|
||||||
set AR=ar
|
set AR=ar
|
||||||
|
set MAKE=make
|
||||||
|
set SIZE=size
|
||||||
make BACNET_PORT=win32 BUILD=release clean all
|
make BACNET_PORT=win32 BUILD=release clean all
|
||||||
|
|
||||||
rem Build for MinGW debug
|
rem Build for MinGW debug
|
||||||
|
|||||||
+15
-14
@@ -1,3 +1,11 @@
|
|||||||
|
# tools - only if you need them.
|
||||||
|
# Most platforms have this already defined
|
||||||
|
# CC = gcc
|
||||||
|
# AR = ar
|
||||||
|
# MAKE = make
|
||||||
|
# SIZE = size
|
||||||
|
#
|
||||||
|
# Assumes rm and cp are available
|
||||||
|
|
||||||
# Directories
|
# Directories
|
||||||
BACNET_PORT = linux
|
BACNET_PORT = linux
|
||||||
@@ -34,23 +42,16 @@ LFLAGS = -Wl,$(LIBRARIES)
|
|||||||
.EXPORT_ALL_VARIABLES:
|
.EXPORT_ALL_VARIABLES:
|
||||||
|
|
||||||
SUBDIRS = readprop writeprop readfile writefile reinit server dcc \
|
SUBDIRS = readprop writeprop readfile writefile reinit server dcc \
|
||||||
whohas whois ucov timesync epics readpropm mstpcap
|
whohas whois ucov timesync epics readpropm mstpcap \
|
||||||
|
whoisrouter iamrouter initrouter
|
||||||
|
|
||||||
ifneq (,$(findstring -DBAC_ROUTING,$(BACNET_DEFINES)))
|
ifneq (,$(findstring -DBAC_ROUTING,$(BACNET_DEFINES)))
|
||||||
SUBDIRS += whoisrouter iamrouter initrouter gateway
|
SUBDIRS += gateway
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
TARGETS = all clean
|
||||||
|
|
||||||
.PHONY : all $(SUBDIRS) clean
|
$(TARGETS): %: $(patsubst %, %.%, $(SUBDIRS))
|
||||||
|
|
||||||
all : $(SUBDIRS)
|
|
||||||
@echo "utilities are in the bin directory"
|
|
||||||
|
|
||||||
$(SUBDIRS) :
|
|
||||||
$(MAKE) -C $@
|
|
||||||
|
|
||||||
clean :
|
|
||||||
for dir in $(SUBDIRS); do \
|
|
||||||
$(MAKE) -C $$dir clean; \
|
|
||||||
done
|
|
||||||
|
|
||||||
|
$(foreach TGT, $(TARGETS), $(patsubst %, %.$(TGT), $(SUBDIRS))):
|
||||||
|
$(MAKE) -b -C $(subst ., , $@)
|
||||||
|
|||||||
@@ -4,12 +4,15 @@
|
|||||||
# Most platforms have this already defined
|
# Most platforms have this already defined
|
||||||
# CC = gcc
|
# CC = gcc
|
||||||
# AR = ar
|
# AR = ar
|
||||||
|
# MAKE = make
|
||||||
|
# SIZE = size
|
||||||
|
#
|
||||||
|
# Assumes rm and cp are available
|
||||||
|
|
||||||
# target
|
# target
|
||||||
TARGET = bacnet
|
TARGET = bacnet
|
||||||
LIBRARY = lib$(TARGET).a
|
LIBRARY = lib$(TARGET).a
|
||||||
|
|
||||||
|
|
||||||
CORE_SRC = \
|
CORE_SRC = \
|
||||||
$(BACNET_CORE)/apdu.c \
|
$(BACNET_CORE)/apdu.c \
|
||||||
$(BACNET_CORE)/npdu.c \
|
$(BACNET_CORE)/npdu.c \
|
||||||
@@ -90,6 +93,7 @@ HANDLER_SRC = \
|
|||||||
$(BACNET_HANDLER)/s_iam.c \
|
$(BACNET_HANDLER)/s_iam.c \
|
||||||
$(BACNET_HANDLER)/s_cov.c \
|
$(BACNET_HANDLER)/s_cov.c \
|
||||||
$(BACNET_HANDLER)/s_rd.c \
|
$(BACNET_HANDLER)/s_rd.c \
|
||||||
|
$(BACNET_HANDLER)/s_router.c \
|
||||||
$(BACNET_HANDLER)/s_rp.c \
|
$(BACNET_HANDLER)/s_rp.c \
|
||||||
$(BACNET_HANDLER)/s_rpm.c \
|
$(BACNET_HANDLER)/s_rpm.c \
|
||||||
$(BACNET_HANDLER)/s_ts.c \
|
$(BACNET_HANDLER)/s_ts.c \
|
||||||
|
|||||||
Reference in New Issue
Block a user