forked from parallella/parallella-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (39 loc) · 1.5 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
CC=gcc
CPP=g++
CFLAGS=-Wall
CLIBX=-lX11
CPTHRD=-pthread
CLIBRT=-lrt
CLIBPP=-lstdc++
GPIOSRCS=para_morse.c para_gpio.c
GPIODEPS=Makefile $(GPIOSRCS) para_morse.h para_gpio.h
DESTDIR =
PREFIX = "/usr/local"
DATADIR = "${PREFIX}/share/parallella"
MANDIR = "${PREFIX}/share/man"
BINDIR = "${PREFIX}/bin"
all: xtemp pmorse
everything: xtemp pmorse gpiotest porcutest spitest facetest
xtemp: xtemp.c
$(CC) -o xtemp xtemp.c $(CFLAGS) $(CLIBX) $(CPTHRD)
pmorse: pmorse.c $(GPIODEPS)
$(CC) -o pmorse pmorse.c $(GPIOSRCS) $(CFLAGS)
gpiotest: gpiotest.c $(GPIODEPS)
$(CC) -o gpiotest gpiotest.c $(GPIOSRCS) $(CFLAGS) $(CLIBRT)
porcutest: porcutest.cpp para_gpio.c para_gpio.cpp
$(CC) -o porcutest porcutest.cpp para_gpio.c para_gpio.cpp $(CLIBPP) $(CFLAGS)
spitest: spitest.cpp para_spi.cpp para_spi.h para_gpio.c para_gpio.cpp para_gpio.h
$(CC) -o spitest spitest.cpp para_spi.cpp para_gpio.cpp para_gpio.c $(CLIBPP) $(CFLAGS)
facetest: facetest.cpp para_face.cpp para_face.h para_spi.cpp para_spi.h para_gpio.c para_gpio.cpp para_gpio.h
$(CC) -o facetest facetest.cpp para_face.cpp para_spi.cpp para_gpio.cpp para_gpio.c $(CLIBPP) $(CFLAGS)
clean:
rm -f xtemp pmorse gpiotest porcutest spitest facetest
install: install-exec
install-exec: xtemp pmorse
install -D xtemp "${DESTDIR}${BINDIR}/xtemp"
install -D pmorse "${DESTDIR}${BINDIR}/pmorse"
uninstall: uninstall-exec
uninstall-exec:
rm "${DESTDIR}${BINDIR}/xtemp"
rm "${DESTDIR}${BINDIR}/pmorse"
.PHONY: clean install install-exec uninstall uninstall-exec