6 |
|
|
7 |
|
common := $(shell realpath $(CURDIR)/../Common) |
8 |
|
|
9 |
< |
CPPFLAGS := -MD -I$(common) |
9 |
> |
CPPFLAGS := -MD -I/usr/local/include -I$(common) |
10 |
|
CXXFLAGS := -Wall -pedantic -g -O2 |
11 |
< |
LDFLAGS := -L$(common) |
12 |
< |
LDLIBS := -ltruck |
11 |
> |
LDFLAGS := -L/usr/local/lib |
12 |
> |
LDLIBS := -lpcre |
13 |
> |
|
14 |
> |
.PHONY: all clean |
15 |
|
|
16 |
|
all: SteeringWheelRemote |
17 |
|
|
18 |
< |
SteeringWheelRemote: SteeringWheelRemote.cpp |
17 |
< |
$(MAKE) -C $(common) |
18 |
> |
SteeringWheelRemote: SteeringWheelRemote.cpp $(common)/libtruck.a |
19 |
|
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) -o $@ $+ $(LOADLIBES) $(LDLIBS) |
20 |
|
|
21 |
+ |
$(common)/libtruck.a: $(common)/posix.o $(common)/regex.o |
22 |
+ |
$(MAKE) -C $(@D) $(@F) |
23 |
+ |
|
24 |
|
clean: |
25 |
|
rm -f SteeringWheelRemote *.core *.d |