File: Makefile.examples.template

package info (click to toggle)
liburcu 0.15.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 8,356 kB
  • sloc: ansic: 23,361; xml: 23,227; sh: 6,480; makefile: 1,045; cpp: 15
file content (26 lines) | stat: -rw-r--r-- 816 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
# SPDX-FileCopyrightText: 2013 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
#
# SPDX-License-Identifier: MIT

# This makefile is purposefully kept simple to support GNU and BSD make.

LOCAL_CFLAGS := -g -O2 -Wall
AM_V_P := :

all: $(BINARY)

$(BINARY): $(OBJECTS)
	@verbose="$(AM_V_P)"; if [ "x$$verbose" = "x" ]; then verbose=":"; fi; \
		if $$verbose; then set -x; else echo "  CCLD     $@"; fi; \
		$(CC) $(LOCAL_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
		-o $@ $(OBJECTS) $(LIBS)

$(OBJECTS): $(SOURCES) $(DEPS)
	@verbose="$(AM_V_P)"; if [ "x$$verbose" = "x" ]; then verbose=":"; fi; \
		if $$verbose; then set -x; else echo "  CC       $@"; fi; \
		$(CC) $(LOCAL_CFLAGS) $(AM_CFLAGS) $(CFLAGS) $(AM_CPPFLAGS) $(CPPFLAGS) \
		-c -o $@ $(SOURCES)

.PHONY: clean
clean:
	rm -f *.o $(BINARY)