Fixed a few problems with ptransfer in linux builds, but then relagated it to Win32 only builds (left the errors for M$-only functions like _kbhit)
Added a makefile for it.
This commit is contained in:
@@ -47,8 +47,11 @@ LFLAGS = -Wl,$(LIBRARIES)
|
||||
|
||||
SUBDIRS = readprop writeprop readfile writefile reinit server dcc \
|
||||
whohas whois ucov timesync epics readpropm \
|
||||
mstpcap ptransfer uptransfer \
|
||||
mstpcap uptransfer \
|
||||
whoisrouter iamrouter initrouter
|
||||
ifeq (${BACNET_PORT},win32)
|
||||
SUBDIRS += ptransfer
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring -DBAC_ROUTING,$(BACNET_DEFINES)))
|
||||
SUBDIRS += gateway
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
#Makefile to build BACnet Application for the Linux Port
|
||||
|
||||
# tools - only if you need them.
|
||||
# Most platforms have this already defined
|
||||
# CC = gcc
|
||||
|
||||
TARGET = ptransfer
|
||||
|
||||
TARGET_BIN = ${TARGET}$(TARGET_EXT)
|
||||
|
||||
SRCS = main.c
|
||||
|
||||
OBJS = ${SRCS:.c=.o}
|
||||
|
||||
all: ${BACNET_LIB_TARGET} Makefile ${TARGET_BIN}
|
||||
|
||||
${TARGET_BIN}: ${OBJS} Makefile ${BACNET_LIB_TARGET}
|
||||
${CC} ${PFLAGS} ${OBJS} ${LFLAGS} -o $@
|
||||
size $@
|
||||
cp $@ ../../bin
|
||||
|
||||
lib: ${BACNET_LIB_TARGET}
|
||||
|
||||
${BACNET_LIB_TARGET}:
|
||||
( cd ${BACNET_LIB_DIR} ; $(MAKE) clean ; $(MAKE) )
|
||||
|
||||
.c.o:
|
||||
${CC} -c ${CFLAGS} $*.c -o $@
|
||||
|
||||
depend:
|
||||
rm -f .depend
|
||||
${CC} -MM ${CFLAGS} *.c >> .depend
|
||||
|
||||
clean:
|
||||
rm -f core ${TARGET_BIN} ${OBJS} ${BACNET_LIB_TARGET} $(TARGET).map
|
||||
|
||||
include: .depend
|
||||
@@ -29,7 +29,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <errno.h>
|
||||
#include <time.h> /* for time */
|
||||
#if defined(WIN32) || defined(__BORLANDC__)
|
||||
#include <conio.h>
|
||||
#endif
|
||||
#define PRINT_ENABLED 1
|
||||
|
||||
#include "bacdef.h"
|
||||
|
||||
Reference in New Issue
Block a user