Add commas where people expect commas in sets
[matroid-finder.git] / Makefile
blob1a99eda13118d424710678794a83569b6f0f872e
1 PREFIX ?= /usr
2 BINDIR ?= $(PREFIX)/bin
3 MANDIR ?= $(PREFIX)/share/man
5 # Compiler options
6 CC=cc
7 LD=ld
8 CFLAGS=-std=c99 -D_POSIX_C_SOURCE=200809L
9 LDFLAGS=
11 # Our files
13 CFILES=$(wildcard *.c)
14 HFILES=$(wildcard *.h)
15 OFILES=$(patsubst %.c,%.o,$(CFILES))
17 default: all
18 .PHONY: all
19 all: matroid-finder
21 matroid-finder: $(OFILES)
22 $(CC) -o $@ $^ $(LDFLAGS)
24 .PHONY: clean
25 clean:
26 rm -f $(OFILES)
27 rm -f matroid-finder
29 .PHONY: install
30 install: all
31 mkdir -p $(DESTDIR)$(BINDIR)
32 cp -f matroid-finder $(DESTDIR)$(BINDIR)
33 mkdir -p $(DESTDIR)$(MANDIR)/man1
34 cp -f matroid-finder.1 $(DESTDIR)$(MANDIR)/man1/matroid-finder.1
36 .PHONY: uninstall
37 uninstall:
38 cd $(DESTDIR)$(BINDIR) && rm -f matroid-finder
39 cd $(DESTDIR)$(MANDIR)/man1 && rm -f matroid-finder.1
41 # Not automatically kept in sync!
43 matroid-finder.o: matroid-finder.c Makefile $(HFILES)
44 $(CC) $(CFLAGS) -o $@ -c $<