Commit 891becdf authored by mz-fuzzy's avatar mz-fuzzy

configure - cli parameters

cpu optimalization improvements
parent 3b138276
...@@ -69,7 +69,7 @@ install-libs: ...@@ -69,7 +69,7 @@ install-libs:
@if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi @if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
@install -m 0755 ${LIBNAME} ${LIB_DIR} @install -m 0755 ${LIBNAME} ${LIB_DIR}
@ln -sf ${LIB_DIR}/${LIBNAME} ${LIB_DIR}/${LIBNAME}.1 @ln -sf ${LIB_DIR}/${LIBNAME} ${LIB_DIR}/${LIBNAME}.1
# @${LDCONFIG} @${LDCONFIG}
upload-libs: upload-libs:
@echo "[Uploading Libs to ${REMOTE}]" @echo "[Uploading Libs to ${REMOTE}]"
......
Python Wrapper for RF24
See http://tmrh20.github.io/RF24 for more information
This diff is collapsed.
############################################################################# #############################################################################
# #
# Makefile for librf24 examples on Raspberry Pi # Makefile for librf24 examples on Linux
# #
# License: GPL (General Public License) # License: GPL (General Public License)
# Author: gnulnulf <arco@appeltaart.mine.nu> # Author: gnulnulf <arco@appeltaart.mine.nu>
...@@ -9,41 +9,40 @@ ...@@ -9,41 +9,40 @@
# Description: # Description:
# ------------ # ------------
# use make all and make install to install the examples # use make all and make install to install the examples
# You can change the install directory by editing the prefix line
# #
prefix := /usr/local
# Detect the Raspberry Pi by the existence of the bcm_host.h file ifeq ($(wildcard ../Makefile.inc), )
BCMLOC=/opt/vc/include/bcm_host.h $(error Configuration not found. Run ./configure first)
ARCH=armv6zk
ifeq "$(shell uname -m)" "armv7l"
ARCH=armv7-a
endif endif
ifneq ("$(wildcard $(BCMLOC))","") include ../Makefile.inc
# The recommended compiler flags for the Raspberry Pi
CCFLAGS=-Ofast -mfpu=vfp -mfloat-abi=hard -march=$(ARCH) -mtune=arm1176jzf-s
endif
# define all programs # define all programs
#PROGRAMS = scanner pingtest gettingstarted
PROGRAMS = gettingstarted gettingstarted_call_response transfer pingpair_dyn PROGRAMS = gettingstarted gettingstarted_call_response transfer pingpair_dyn
SOURCES = ${PROGRAMS:=.cpp} SOURCES = ${PROGRAMS:=.cpp}
all: ${PROGRAMS} all: ${PROGRAMS}
${PROGRAMS}: ${SOURCES} ${PROGRAMS}: ${SOURCES}
g++ ${CCFLAGS} -Wall -I../ -lrf24-bcm $@.cpp -o $@ ${CXX} ${CFLAGS} -I${HEADER_DIR}/.. -I.. -L${LIB_DIR} -lrf24 $@.cpp -o $@
clean: clean:
rm -rf $(PROGRAMS) rm -rf $(PROGRAMS)
install: all install: all
test -d $(prefix) || mkdir $(prefix) mkdir -p $(EXAMPLES_DIR)
test -d $(prefix)/bin || mkdir $(prefix)/bin for prog in $(PROGRAMS); do \
install -m 0755 $$prog $(EXAMPLES_DIR); \
done
upload: all
@echo "[Uploading examples to ${REMOTE}:${REMOTE_EXAMPLES_DIR}]"
@ssh -q -t -p ${REMOTE_PORT} ${REMOTE} "mkdir -p ${REMOTE_EXAMPLES_DIR}"
@ssh -q -t -p ${REMOTE_PORT} ${REMOTE} "mkdir -p /tmp/RF24_examples"
@scp -q -P ${REMOTE_PORT} ${PROGRAMS} ${REMOTE}:/tmp/RF24_examples
for prog in $(PROGRAMS); do \ for prog in $(PROGRAMS); do \
install -m 0755 $$prog $(prefix)/bin; \ ssh -q -t -p ${REMOTE_PORT} ${REMOTE} "sudo install -m 0755 /tmp/RF24_examples/$${prog} ${REMOTE_EXAMPLES_DIR}"; \
done done
@ssh -q -t -p ${REMOTE_PORT} ${REMOTE} "rm -rf /tmp/RF24_examples"
.PHONY: install .PHONY: install upload
...@@ -21,7 +21,7 @@ if sys.version_info >= (3,): ...@@ -21,7 +21,7 @@ if sys.version_info >= (3,):
else: else:
BOOST_LIB = 'boost_python' BOOST_LIB = 'boost_python'
process_configparams() #process_configparams()
crossunixccompiler.register() crossunixccompiler.register()
# module_RF24 = distutils.core.Extension('RF24', # module_RF24 = distutils.core.Extension('RF24',
......
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
#ifndef __RF24_INCLUDES_H__ #ifndef __RF24_INCLUDES_H__
#define __RF24_INCLUDES_H__ #define __RF24_INCLUDES_H__
#define RF24_BBB #define RF24_SPIDEV
#include "BBB/RF24_arch_config.h" #include "SPIDEV/RF24_arch_config.h"
#include "BBB/interrupt.h" #include "SPIDEV/interrupt.h"
#endif
#endif
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment