C from Rust: Reference C programs
[learn-rust.git] / call-c-from-rust / Makefile
1 CFLAGS += $(shell pkg-config --cflags mount)
2 LIBMOUNT = $(shell pkg-config --libs mount)
3
4 all: c-mounts c-langinfo
5
6 c-mounts: c-mounts.o
7         $(CC) -Wall -o $@ $^ $(LIBMOUNT)
8
9 c-langinfo: c-langinfo.o
10         $(CC) -Wall -o $@ $^
11
12 clean:
13         rm -f c-mounts c-langinfo *.o
14
15 run: all
16         LANG=en_US.UTF-8 ./c-langinfo
17         LANG=en_GB.UTF-8 ./c-langinfo
18         LANG=en_IE.UTF-8 ./c-langinfo
19         ./c-mounts
20
21 .PHONY: clean run