kopia lustrzana https://github.com/F5OEO/WsprryPi
make: Use predefined variables in rules.
rodzic
b3cba5b70a
commit
5af2ee5ef9
15
makefile
15
makefile
|
@ -1,5 +1,9 @@
|
|||
prefix=/usr/local
|
||||
|
||||
CFLAGS += -Wall
|
||||
CXXFLAGS += -D_GLIBCXX_DEBUG -std=c++11 -Wall -Werror -fmax-errors=5
|
||||
LDLIBS += -lm
|
||||
|
||||
ifeq ($(findstring armv6,$(shell uname -m)),armv6)
|
||||
# Broadcom BCM2835 SoC with 700 MHz 32-bit ARM 1176JZF-S (ARMv6 arch)
|
||||
PI_VERSION = -DRPI1
|
||||
|
@ -12,16 +16,16 @@ endif
|
|||
all: wspr gpioclk
|
||||
|
||||
mailbox.o: mailbox.c mailbox.h
|
||||
g++ -c -Wall -lm mailbox.c
|
||||
$(CC) $(CFLAGS) -c mailbox.c
|
||||
|
||||
wspr: mailbox.o wspr.cpp mailbox.h
|
||||
g++ -D_GLIBCXX_DEBUG -std=c++11 -Wall -Werror -fmax-errors=5 -lm $(PI_VERSION) mailbox.o wspr.cpp -owspr
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) $(PI_VERSION) mailbox.o wspr.cpp -owspr
|
||||
|
||||
gpioclk: gpioclk.cpp
|
||||
g++ -D_GLIBCXX_DEBUG -std=c++11 -Wall -Werror -fmax-errors=5 -lm $(PI_VERSION) gpioclk.cpp -ogpioclk
|
||||
$(CXX) $(CXXFLAGS) $(LDFLAGS) $(LDLIBS) $(PI_VERSION) gpioclk.cpp -ogpioclk
|
||||
|
||||
clean:
|
||||
-rm -f gpioclk gpioclk.o wspr wspr.o mailbox.o
|
||||
$(RM) *.o gpioclk wspr
|
||||
|
||||
.PHONY: install
|
||||
install: wspr
|
||||
|
@ -30,6 +34,5 @@ install: wspr
|
|||
|
||||
.PHONY: uninstall
|
||||
uninstall:
|
||||
-rm -f $(prefix)/bin/wspr
|
||||
-rm -f $(prefix)/bin/gpioclk
|
||||
$(RM) $(prefix)/bin/wspr $(prefix)/bin/gpioclk
|
||||
|
||||
|
|
5
wspr.cpp
5
wspr.cpp
|
@ -45,7 +45,12 @@
|
|||
#include <pthread.h>
|
||||
#include <sys/timex.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#include "mailbox.h"
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
|
||||
// Note on accessing memory in RPi:
|
||||
//
|
||||
|
|
Ładowanie…
Reference in New Issue