-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (40 loc) · 816 Bytes
/
Makefile
File metadata and controls
50 lines (40 loc) · 816 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
### Makefile
###
### Create: 2009-12-17
### Updated: 2012-06-21
###
ifeq ($(OS), Windows_NT)
UNAME := Windows
else
UNAME := $(shell uname -s)
endif
CC=gcc
CFLAGS=-DSOCKLEN_T=unsigned
LDLIBS=
## for Mac OS X environment, use one of options
ifeq ($(UNAME), Darwin)
CFLAGS=-DBIND_8_COMPAT=1 -DSOCKLEN_T=socklen_t
LDLIBS=-lresolv
endif
## for Solaris
ifeq ($(UNAME), SunOS)
LDLIBS=-lresolv -lsocket -lnsl
endif
## for Microsoft Windows native
ifeq ($(UNAME), Windows)
ifeq (${CC}, clang)
CFLAGS+=-ccc-gcc-name llvm-gcc.exe
LDLIBS+=-ccc-gcc-name llvm-gcc.exe
endif
LDLIBS := ${LDLIBS} -lws2_32 -liphlpapi
endif
all: connect
connect: connect.o
connect.o: connect.c
##
clean:
rm -f connect.o *~
veryclean: clean
rm -f connect connect.exe
rebuild: veryclean all
### End of Makefile