6 |
|
|
7 |
|
common := $(shell realpath $(CURDIR)/../Common) |
8 |
|
|
9 |
+ |
include $(common)/common.mk |
10 |
+ |
|
11 |
|
CPPFLAGS := -MD -I/usr/local/include -I$(common) \ |
12 |
|
$(shell pkg-config --cflags-only-I glib-2.0) |
13 |
|
CXXFLAGS := -Wall -pedantic -g -O2 |
20 |
|
all: SteeringWheelRemote |
21 |
|
|
22 |
|
SteeringWheelRemote: SteeringWheelRemote.o Audacious.o $(common)/libtruck.a |
23 |
< |
@echo [$(+F)] |
23 |
> |
@echo "$(bright)$(white)$(CXX)\t$(blue)[$(reset)$(+F)$(bright)$(blue)]$(reset)" |
24 |
|
@$(CXX) $(LDFLAGS) -o $@ $+ $(LOADLIBES) $(LDLIBS) |
25 |
< |
@echo [$(@F)] |
24 |
< |
|
25 |
< |
%.o: %.cpp |
26 |
< |
@echo [$(<F)] |
27 |
< |
@$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $< |
28 |
< |
@echo [$(@F)] |
25 |
> |
@echo "$(bright)$(white)$(CXX)\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)" |
26 |
|
|
27 |
|
Audacious.o: Audacious.cpp |
28 |
< |
@echo [$(<F)] |
28 |
> |
@echo "$(bright)$(white)$(CXX)\t$(blue)[$(reset)$(<F)$(bright)$(blue)]$(reset)" |
29 |
|
@$(CXX) $(CPPFLAGS) $(shell pkg-config --cflags-only-I audacious) \ |
30 |
|
$(filter-out -pedantic,$(CXXFLAGS)) \ |
31 |
|
$(shell pkg-config --cflags-only-other audacious) -c -o $@ $< |
32 |
< |
@echo [$(@F)] |
32 |
> |
@echo "$(bright)$(white)$(CXX)\t$(green)[$(reset)$(@F)$(bright)$(green)]$(reset)" |
33 |
|
|
34 |
|
$(common)/libtruck.a: $(common)/posix.o $(common)/regex.o |
35 |
|
@$(MAKE) --no-print-directory -C $(@D) $(@F) |