File: Makefile-subdir

package info (click to toggle)
derivations 0.53.20120414-1.2
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,208 kB
  • ctags: 486
  • sloc: cpp: 1,634; perl: 600; makefile: 153; sh: 116
file content (26 lines) | stat: -rw-r--r-- 633 bytes parent folder | download | duplicates (2)
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

# This makefile is meant to be used only when accessed
# through a symbolic link from an immediate subdirectory.

CXXFLAGS += $(shell pkg-config --cflags poppler)

warn := -Wall -Wextra

include ../Makefile-optim
warn  += $(werror)
clean := cleanless clean
.PHONY: all alld $(clean)
all :
alld:
ifneq ($(strip $(filter-out $(clean), $(MAKECMDGOALS))),)
  alld := $(patsubst %.cc, %.d, $(wildcard *.cc))
  include $(alld)
endif
%.d: %.cc; g++ -MM $< | sed -e 's/:/ $*.d:/' >$@
%.o:; g++ $(warn) $(optim) $(CXXFLAGS) -c $< -o $*.o

cleanless:
	rm -fv *.d *.o *.gch a.out
	$(if $(alld), $(MAKE) alld)
clean: cleanless; rm -fv $(prog)