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:
tbrennan3
2011-09-12 11:50:05 +00:00
parent cd8946c62d
commit a41c8fcc99
3 changed files with 43 additions and 1 deletions
+4 -1
View File
@@ -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
+37
View File
@@ -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
+2
View File
@@ -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"