-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
30 lines (22 loc) · 610 Bytes
/
Makefile
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
# Platform
CC=gcc
DEBUG=-ggdb
CFLAGS=-Wall -Wno-pointer-sign $(DEBUG)
LDFLAGS=
NULL=
UNAME := $(shell $(CC) -dumpmachine 2>&1 | grep -E -o "linux|darwin")
ifeq ($(UNAME), darwin)
OSSUPPORT = darwin
OSSUPPORT_CFLAGS += -DDARWIN
endif
CFLAGS += $(OSSUPPORT_CFLAGS)
LDFLAGS += -lpthread -lm
all: qnap-finder
qnap-finder.o: qnap-finder.c qnap-finder.h
$(CC) $(CFLAGS) -c -o qnap-finder.o qnap-finder.c
list.o: list.c list.h
$(CC) $(CFLAGS) -c -o list.o list.c
qnap-finder: qnap-finder.o list.o
$(CC) $(CFLAGS) -o qnap-finder qnap-finder.o list.o $(LDFLAGS)
clean:
rm -f *.o qnap-finder