Distinguish boundary nodes for n=4 as well
[matroid-finder.git] / Makefile
blob070b72c864a0d9ff1f3ef8cf406397647ce301b4
1 PREFIX ?= /usr
2 BINDIR ?= $(PREFIX)/bin
3 MANDIR ?= $(PREFIX)/share/man
5 # Compiler options
6 CC=gcc
7 LD=gcc
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 $(LD) -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 $<