File: Make.rules

package info (click to toggle)
pesign 0.112-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 956 kB
  • sloc: ansic: 11,693; sh: 606; makefile: 209
file content (81 lines) | stat: -rw-r--r-- 1,605 bytes parent folder | download | duplicates (4)
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
default : all

.PHONY: default all deps clean install install_systemd install_sysvinit test

include $(TOPDIR)/Make.version

all : deps

deps :

clean :

install :

install_systemd :

install_sysvinit :

test :

%.a :
	$(AR) -cvqs $@ $^

% : %.o
	$(CCLD) $(ccldflags) $(CPPFLAGS) -o $@ $^ $(LDLIBS)

%.so : 
	$(CCLD) $(ccldflags) $(CPPFLAGS) $(SOFLAGS) \
		-Wl,-soname,$@.$(MAJOR_VERSION) \
		-o $@ $^ $(LDLIBS)

%.o: %.c
	$(CC) $(cflags) $(CPPFLAGS) -c -o $@ $(filter %.c %.o %.S,$^)

%.S: %.c
	$(CC) $(cflags) $(CPPFLAGS) -S $< -o $@

%.E: %.c
	$(CC) $(cflags) $(CPPFLAGS) -E $< -o $@

%.c : %.h

.%.d :

define substitute-version =
	sed							\
		-e "s,@@VERSION@@,$(VERSION),g"			\
		-e "s,@@LIBDIR@@,$(libdir),g"			\
		-e "s,@@LIBEXECDIR@@,$(libexecdir),g"		\
		$(1) > $(2)
endef

%.pc : %.pc.in
	@$(call substitute-version,$<,$@)

%.spec : %.spec.in
	@$(call substitute-version,$<,$@)

%.service : %.service.in
	@$(call substitute-version,$<,$@)

%.sysvinit : %.sysvinit.in
	@$(call substitute-version,$<,$@)

pkg-config-cflags = \
	$(shell if [ -n "$(PKGS)" ]; then $(PKG_CONFIG) --cflags $(PKGS); fi)
pkg-config-ldflags = \
	$(shell if [ -n "$(PKGS)" ]; then $(PKG_CONFIG) --libs-only-L --libs-only-other $(PKGS) ; fi)
pkg-config-ldlibs = \
	$(shell if [ -n "$(PKGS)" ]; then $(PKG_CONFIG) --libs-only-l $(PKGS) ; fi)

objects-of = \
	$(patsubst %.c,%.o,$(1))

define deps-of =
	$(foreach src,$(filter %.c,$(1)),$(patsubst %.c,.%.d,$(src))) \
	$(foreach src,$(filter %.S,$(1)),$(patsubst %.S,.%.d,$(src)))
endef

$(TOPDIR)/libdpe/%.a $(TOPDIR)/libdpe/% :
	$(MAKE) -C $(TOPDIR)/libdpe $(notdir $@)