File: Makefile

package info (click to toggle)
console-braille 1.9
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 332 kB
  • sloc: ansic: 1,869; pascal: 100; makefile: 34
file content (37 lines) | stat: -rw-r--r-- 676 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
27
28
29
30
31
32
33
34
35
36
37
BRLS:=$(wildcard brl-*.c)
TARGETS:=$(BRLS:.c=.psf)
PROGS:=$(BRLS:.c=)
TESTPROGS:=$(BRLS:.c=.test)
TESTS:=$(BRLS:.c=.txt)

UNAME=$(shell uname)

all: $(TARGETS) brl.uni gen-psf-block

test: $(TESTS)

ifeq ($(UNAME),Linux)
all: setbrlkeys
endif

brl-%: brl-%.o psf.o
	$(CC) -o $@ $(LDFLAGS) $^ $(LDLIBS)

gen-psf-block: gen-psf-block.o psf.o

%.test.o: %.c do.h
	$(CC) $(CFLAGS) $(CPPFLAGS) -DTEST -c -o $@ $<

.INTERMEDIATE: $(PROGS) $(TESTPROGS) uni

$(TARGETS): %.psf: %
	./$< > $@

$(TESTS): %.txt: %.test
	./$< > $@

brl.uni: uni
	./$< 0 > $@

clean:
	rm -f $(PROGS) $(TESTPROGS) psf.o $(BRLS:.c=.o) gen-psf-block.o $(TARGETS) $(TESTS) brl.uni uni setbrlkeys gen-psf-block