add Makefile for fm_transmitter

pull/7/head
root 2015-08-07 12:39:55 +08:00
rodzic 4d76178669
commit 2fa240f72d
3 zmienionych plików z 39 dodań i 0 usunięć

2
.gitignore vendored 100644
Wyświetl plik

@ -0,0 +1,2 @@
*.o
*.swp

31
Makefile 100644
Wyświetl plik

@ -0,0 +1,31 @@
CC = gcc
CXX = g++
AR = ar
LD = g++
CFLAGS = -Wall -fexceptions -lpthread -lm -O3 -fpermissive -fno-strict-aliasing
TARGET = fm_transmitter
all: release
OBJS = main.o wave_reader.o stdin_reader.o error_reporter.o transmitter.o
release: $(OBJS)
$(LD) $(CFLAGS) -o $(TARGET) $(OBJS)
wave_reader.o: wave_reader.cpp wave_reader.h
$(CC) $(CFLAGS) -c wave_reader.cpp
stdin_reader.o: stdin_reader.cpp
$(CC) $(CFLAGS) -c stdin_reader.cpp
error_reporter.o: error_reporter.cpp
$(CC) $(CFLAGS) -c error_reporter.cpp
transmitter.o: transmitter.cpp
$(CC) $(CFLAGS) -c transmitter.cpp
main.o: main.cpp
$(CC) $(CFLAGS) -c main.cpp
clean:
rm *.o

Wyświetl plik

@ -4,6 +4,12 @@ Use Raspberry Pi as FM transmitter. Now supports both RPi 1 and RPi 2 boards.
This project uses the general clock output to produce frequency modulated radio communication. It is based on idea originaly posted here: [http://icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter](http://icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter), but does not use DMA controller in order to distribute samples to output (clock generator),so sound quality is worse as in PiFm project and only mono transmition is available but this makes possible to run it on all kind of boards.
## Compile
```
sudo apt-get install make gcc g++
make
```
## How to use it
To compile this project you can use Code::Blocks IDE [(http://codeblocks.org/)](http://codeblocks.org/) or alternatively convert CBP file into makefile.