golden_boy615 |
04-11-2010 04:29 AM |
sms server tools cross compiling
hello
I wanted to cross compile sms server tools( http://smstools3.kekekasvi.com/)
for arm-linux with arm-linux-gcc compiler but I can not this is all information that I have from it's error:
Quote:
[root@localhost smstools3]# ls
doc examples install.sh LICENSE Makefile package.sh README scripts src uninstall.sh
|
Quote:
[root@localhost smstools3]# cat Makefile
# Makefile
# If you change destination of executables, remember to change
# startup script (init.d/sms3) too.
#BINDIR=/usr/local/bin
BINDIR=/mnt/sd/Utility/sms/ ///I changed here for cross compilation
VERSION=$(shell grep package_version src/version.h | cut -f2)
compile:
cd src && $(MAKE) -$(MAKEFLAGS)
install: compile
./install.sh $(BINDIR)
uninstall:
./uninstall.sh $(BINDIR)
clean:
cd src && $(MAKE) -$(MAKEFLAGS) clean
package: compile clean
./package.sh
|
Quote:
[root@localhost smstools3]# ls src/
alarm.c blacklist.h charset.c extras.h locking.h Makefile modeminit.h smsd.c stats.c whitelist.c
alarm.h cfgfile.c charset.h extras.o logging.c Makefile~ pdu.c smsd_cfg.c stats.h whitelist.h
blacklist.c cfgfile.h extras.c locking.c logging.h modeminit.c pdu.h smsd_cfg.h version.h
|
Quote:
[root@localhost smstools3]# cat src/Makefile
# In case of windows, use os_cygwin=yes setting in the configuration file (smsd.conf).
CC=arm-linux-gcc ///I added this line here for cross compilation
# Select your setup size:
CFLAGS = -D NUMBER_OF_MODEMS=64
# Uncomment for Solaris
# CFLAGS += -D SOLARIS
# This might be also needed for Solaris:
# CC=gcc
# Comment this out, to enable statistics
CFLAGS += -D NOSTATS
# Uncomment this to force smsd to run in terminal mode
#CFLAGS += -D TERMINAL
# Uncomment to add debug info
# CFLAGS += -ggdb -O0
# The following option is only used by developers
# CFLAGS += -D DEBUGMSG
CFLAGS += -Wall
# The following enables logfile size more than 2GB
CFLAGS += -D_FILE_OFFSET_BITS=64
all: smsd
smsd: smsd.c extras.o locking.o cfgfile.o logging.o alarm.o smsd_cfg.o charset.o stats.o blacklist.o whitelist.o modeminit.o pdu.o
ifneq (,$(findstring NOSTATS,$(CFLAGS)))
$(CC) $(CFLAGS) -o $@ $^
else
$(CC) `mm-config --cflags` $(CFLAGS) -o $@ $^ `mm-config --ldflags --libs`
endif
clean:
rm -f *.o smsd *.exe *~
|
Quote:
[root@localhost smstools3]# make
cd src && make -
make[1]: Entering directory `/root/Download/Gateway/smstools3-3.1.6/smstools3/src'
arm-linux-gcc -D NUMBER_OF_MODEMS=64 -D NOSTATS -Wall -D_FILE_OFFSET_BITS=64 -c -o locking.o locking.c
locking.c: In function `lockfile':
locking.c:27: error: `PATH_MAX' undeclared (first use in this function)
locking.c:27: error: (Each undeclared identifier is reported only once
locking.c:27: error: for each function it appears in.)
locking.c:27: warning: unused variable `lockfilename'
locking.c: In function `islocked':
locking.c:55: error: `PATH_MAX' undeclared (first use in this function)
locking.c:55: warning: unused variable `lockfilename'
locking.c: In function `unlockfile':
locking.c:72: error: `PATH_MAX' undeclared (first use in this function)
locking.c:72: warning: unused variable `lockfilename'
make[1]: *** [locking.o] Error 1
make[1]: Leaving directory `/root/Download/Gateway/smstools3-3.1.6/smstools3/src'
make: *** [compile] Error 2
|
what should I do for this? how can I fix it?
thanks for any help.
|