forked from preble/libpinproc
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
44 lines (34 loc) · 1.1 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
CC = g++
AR = ar
ARFLAGS = rc
RANLIB = ranlib
RM = rm -f
LIBPINPROC_CFLAGS=-c -Wall -Iinclude
LIBPINPROC = bin/libpinproc.a
LIBPINPROC_DYLIB = bin/libpinproc.dylib
SRCS = src/pinproc.cpp src/PRDevice.cpp src/PRHardware.cpp
OBJS := $(SRCS:.cpp=.o)
INCLUDES = include/pinproc.h src/PRCommon.h src/PRDevice.h src/PRHardware.h
.PHONY: libpinproc
libpinproc: $(LIBPINPROC) $(LIBPINPROC_DYLIB)
$(LIBPINPROC): $(OBJS)
$(AR) $(ARFLAGS) $@ $(OBJS)
$(RANLIB) $@
$(LIBPINPROC_DYLIB): $(OBJS)
g++ -dynamiclib -o $@ `pkg-config --libs libftdi1` $(LDFLAGS) $(OBJS)
.cpp.o:
$(CC) $(LIBPINPROC_CFLAGS) $(CFLAGS) -o $@ $<
clean:
$(RM) $(OBJS)
.PHONY: clean
depend: $(SRCS)
makedepend $(INCLUDES) $^
# DO NOT DELETE THIS LINE -- make depend needs it
src/PRDevice.o: include/pinproc.h src/PRCommon.h src/PRHardware.h
src/PRHardware.o: include/pinproc.h
src/pinproc.o: include/pinproc.h src/PRDevice.h
src/pinproc.o: src/PRCommon.h src/PRHardware.h
src/PRDevice.o: src/PRDevice.h include/pinproc.h
src/PRDevice.o: src/PRCommon.h src/PRHardware.h
src/PRHardware.o: src/PRHardware.h include/pinproc.h
src/PRHardware.o: src/PRCommon.h