summaryrefslogtreecommitdiff
path: root/Makefile
blob: ecfc7dd914b28de343361cbaefb939c002068337 (plain)
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
.POSIX:

# This Makefile was generated by maje
# See https://src.kaivo.net/dev/maje/ for more information
# Do not edit this Makefile by hand

CC=c99
LD=$(CC)
CFLAGS=-Wall -Wextra -Wpedantic -Werror -g
LDFLAGS=
LDLIBS= -lXrandr
SRCDIR=.
OBJDIR=.
BINDIR=$(OBJDIR)
LIBDIR=$(OBJDIR)
DESTDIR=/usr/local

all: $(BINDIR)/autorotate

clean:
	rm -f $(BINDIR)/autorotate $(OBJDIR)/*.o

install: $(BINDIR)/autorotate
	mkdir -p $(DESTDIR)/bin
	cp $(BINDIR)/autorotate $(DESTDIR)/bin

$(BINDIR)/autorotate: $(OBJDIR)/autorotate.o
$(OBJDIR)/autorotate.o: $(SRCDIR)/autorotate.c
	@mkdir -p $(@D)
	$(CC) $(CFLAGS) -o $@ -c $(SRCDIR)/autorotate.c

$(BINDIR)/autorotate:
	@mkdir -p $(@D)
	$(LD) $(LDFLAGS) -o $@ $(OBJDIR)/*.o $(LDLIBS)