File: Makefile

package info (click to toggle)
xsct 2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 112 kB
  • sloc: ansic: 332; makefile: 29
file content (28 lines) | stat: -rw-r--r-- 625 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
CC ?= gcc
MY_CFLAGS ?= -Wall -Wextra -Werror -pedantic -std=c99 -O2 -I /usr/X11R6/include
MY_LDFLAGS ?= -L /usr/X11R6/lib -s
PREFIX ?= /usr
BIN ?= $(PREFIX)/bin
MAN ?= $(PREFIX)/share/man/man1
INSTALL ?= install

PROG = xsct
SRCS = src/xsct.c

LIBS = -lX11 -lXrandr -lm

$(PROG): $(SRCS)
	$(CC) $(CFLAGS) $(MY_CFLAGS) $^ -o $@ $(LDFLAGS) $(MY_LDFLAGS) $(LIBS)

install: $(PROG) $(PROG).1
	$(INSTALL) -d $(DESTDIR)$(BIN)
	$(INSTALL) -m 0755 $(PROG) $(DESTDIR)$(BIN)
	$(INSTALL) -d $(DESTDIR)$(MAN)
	$(INSTALL) -m 0644 $(PROG).1 $(DESTDIR)$(MAN)

uninstall:
	rm -f $(BIN)/$(PROG)
	rm -f $(MAN)/$(PROG).1

clean:
	rm -f $(PROG)