forked from nsqio/libnsq
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (26 loc) · 638 Bytes
/
Makefile
File metadata and controls
35 lines (26 loc) · 638 Bytes
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
35
PREFIX=/usr/local
DESTDIR=
LIBDIR=${PREFIX}/lib
INCDIR=${PREFIX}/include
CFLAGS+=-g -Wall -O2 -DDEBUG -fPIC
LIBS=-lev -levbuffsock
AR=ar
AR_FLAGS=rc
RANLIB=ranlib
all: libnsq test
libnsq: libnsq.a
%.o: %.c
$(CC) -o $@ -c $< $(CFLAGS)
libnsq.a: command.o nsq.o nsqd_connection.o http.o
$(AR) $(AR_FLAGS) $@ $^
$(RANLIB) $@
test: test.o libnsq.a
$(CC) -o $@ $^ $(LIBS)
clean:
rm -rf libnsq.a test test.dSYM *.o
.PHONY: install clean all
install:
install -m 755 -d ${DESTDIR}${INCDIR}
install -m 755 -d ${DESTDIR}${LIBDIR}
install -m 755 libnsq.a ${DESTDIR}${LIBDIR}/libnsq.a
install -m 755 nsq.h ${DESTDIR}${INCDIR}/nsq.h