File: Makefile

package info (click to toggle)
delay 1.0-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 180 kB
  • sloc: ansic: 292; makefile: 91
file content (30 lines) | stat: -rw-r--r-- 598 bytes parent folder | download | duplicates (3)
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
.PHONY : release install clean

OUT = delay
OBJ = main.o dtbuf.o time_ms.o
CFLAGS += -Wall -O3 -g

release: delay

delay: $(OBJ)
	$(CC) $(CFLAGS) $(LDFLAGS) -o $(OUT) $(OBJ)

$(OBJ): dtbuf.h time_ms.h

fmt:
	indent --linux-style \
		--indent-level4 \
		--no-tabs \
		--format-all-comments \
		--braces-on-if-line \
		--space-after-cast \
		*.c *.h
	# fix indent breaking pointer alignment on some function signatures
	find -name '*.[ch]' -exec sed -i '/^[a-z].*(.*)$$/s/ \* / */' {} ';'

clean:
	rm -f $(OBJ) $(OUT)

install: release
	mkdir -p $(DESTDIR)/usr/bin
	install $(OUT) $(DESTDIR)/usr/bin