1 |
douglas |
1 |
# Steering Wheel Remote |
2 |
|
|
# |
3 |
|
|
# Douglas Thrift |
4 |
|
|
# |
5 |
|
|
# $Id$ |
6 |
|
|
|
7 |
douglas |
2 |
common := $(shell realpath $(CURDIR)/../Common) |
8 |
|
|
|
9 |
douglas |
6 |
CPPFLAGS := -MD -I/usr/local/include -I$(common) \ |
10 |
|
|
$(shell pkg-config --cflags-only-I glib-2.0) |
11 |
douglas |
2 |
CXXFLAGS := -Wall -pedantic -g -O2 |
12 |
douglas |
6 |
LDFLAGS := -L/usr/local/lib -L$(common) $(shell pkg-config --libs-only-L audacious) \ |
13 |
|
|
$(shell pkg-config --libs-only-other audacious) |
14 |
|
|
LDLIBS := -lpcre $(shell pkg-config --libs-only-l audacious) |
15 |
douglas |
2 |
|
16 |
douglas |
3 |
.PHONY: all clean |
17 |
|
|
|
18 |
douglas |
1 |
all: SteeringWheelRemote |
19 |
|
|
|
20 |
douglas |
6 |
SteeringWheelRemote: SteeringWheelRemote.o Audacious.o $(common)/libtruck.a |
21 |
|
|
@echo [$(+F)] |
22 |
|
|
@$(CXX) $(LDFLAGS) -o $@ $+ $(LOADLIBES) $(LDLIBS) |
23 |
|
|
@echo [$(@F)] |
24 |
douglas |
2 |
|
25 |
douglas |
6 |
%.o: %.cpp |
26 |
|
|
@echo [$(<F)] |
27 |
|
|
@$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< |
28 |
|
|
@echo [$(@F)] |
29 |
|
|
|
30 |
|
|
Audacious.o: Audacious.cpp |
31 |
|
|
@echo [$(<F)] |
32 |
|
|
@$(CXX) $(CPPFLAGS) $(shell pkg-config --cflags-only-I audacious) \ |
33 |
|
|
$(filter-out -pedantic,$(CXXFLAGS)) \ |
34 |
|
|
$(shell pkg-config --cflags-only-other audacious) -c -o $@ $< |
35 |
|
|
@echo [$(@F)] |
36 |
|
|
|
37 |
douglas |
3 |
$(common)/libtruck.a: $(common)/posix.o $(common)/regex.o |
38 |
douglas |
6 |
@$(MAKE) --no-print-directory -C $(@D) $(@F) |
39 |
douglas |
3 |
|
40 |
douglas |
4 |
-include *.d |
41 |
|
|
|
42 |
douglas |
1 |
clean: |
43 |
douglas |
6 |
@rm -fv SteeringWheelRemote *.core *.d *.o |