summaryrefslogtreecommitdiff
path: root/Makefile
blob: d698f6ff1d6639e7156831bd3b8bfd2847a452f8 (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
CFILES=xcwd.c
CC=gcc
CFLAGS=-Wall -Werror -std=gnu89 #-DDEBUG -g
LDFLAGS=-lX11
EXE="xcwd"
O=${CFILES:.c=.o}
prefix=/usr/

${EXE}: clean ${O}
	${CC} -o $@ ${O} ${CFLAGS} ${LDFLAGS} 

.SUFFIXES: .c .o
.c.o:
	${CC} -c $< ${CFLAGS}

clean:
	rm -vf *.o

distclean: clean
	rm -vf ${EXE}

install: ${EXE}
	install -m 0755 ${EXE} $(prefix)/bin