Makefile: add install rule
This commit is contained in:
parent
b571c4a308
commit
f6dfbeae03
1 changed files with 5 additions and 0 deletions
|
@ -3,6 +3,7 @@ CXXFLAGS ?= -std=c++11 -Wall -O3 -Wno-unused-variable -I /opt/vc/include
|
|||
LDFLAGS ?= -lm -lrt -lpthread -L/opt/vc/lib -lbcm_host
|
||||
CXX ?= c++
|
||||
CC ?= cc
|
||||
PREFIX ?= /usr/local/
|
||||
|
||||
librpitx: librpitx.h gpio.h gpio.cpp dma.h dma.cpp mailbox.c raspberry_pi_revision.c fmdmasync.h fmdmasync.cpp ngfmdmasync.h ngfmdmasync.cpp dsp.h dsp.cpp iqdmasync.h iqdmasync.cpp serialdmasync.h serialdmasync.cpp phasedmasync.h phasedmasync.cpp fskburst.h fskburst.cpp ookburst.cpp ookburst.h atv.h atv.cpp util.h
|
||||
$(CC) $(CFLAGS) -c -o raspberry_pi_revision.o raspberry_pi_revision.c
|
||||
|
@ -10,6 +11,10 @@ librpitx: librpitx.h gpio.h gpio.cpp dma.h dma.cpp mailbox.c raspberry_pi_revisi
|
|||
$(AR) rc librpitx.a rpi.o dsp.o iqdmasync.o ngfmdmasync.o fmdmasync.o dma.o gpio.o mailbox.o raspberry_pi_revision.o serialdmasync.o phasedmasync.o amdmasync.o fskburst.o ookburst.o atv.o util.o mailbox.o
|
||||
|
||||
install: librpitx
|
||||
mkdir -p $(PREFIX)/include/librpitx
|
||||
install *.h $(PREFIX)/include/librpitx
|
||||
mkdir -p $(PREFIX)/lib
|
||||
install librpitx.a $(PREFIX)/lib
|
||||
|
||||
clean:
|
||||
rm -f *.o *.a
|
||||
|
|
Loading…
Reference in a new issue