2 # Makefile for proxychains (requires GNU make), stolen from musl
4 # Use config.mak to override any of the following variables.
5 # Do not make changes here.
8 exec_prefix = $(prefix)
9 bindir = $(exec_prefix)/bin
10 includedir = $(prefix)/include
11 libdir = $(prefix)/lib
13 SRCS
= $(sort $(wildcard *.c
))
15 LOBJS
= $(OBJS
:.o
=.lo
)
16 SONAME
= librocksock.so
19 #EX_SRCS = $(sort $(wildcard examples/*.c))
20 EX_SRCS
= examples
/http_test.c examples
/rocksock_test3.c \
21 examples
/ssh-socks-restart.c examples
/proxychk.c
22 EX_PROGS
= $(EX_SRCS
:.c
=.out
)
24 CFLAGS
+= -Wall
-std
=c99
-D_GNU_SOURCE
-pipe
27 AR
= $(CROSS_COMPILE
)ar
28 RANLIB
= $(CROSS_COMPILE
)ranlib
30 ALL_INCLUDES
= rocksock.h
34 examples
: $(ALL_LIBS
) $(EX_PROGS
)
39 install: $(ALL_LIBS
:lib
%=$(DESTDIR
)$(libdir)/lib
%) $(ALL_INCLUDES
:%=$(DESTDIR
)$(includedir)/%)
41 $(DESTDIR
)$(libdir)/%: $(ALL_LIBS
)
42 install -D
-m
644 $< $@
44 $(DESTDIR
)$(lincludedir
)/%: $(ALL_INCLUDES
)
45 install -D
-m
644 $< $@
48 $(CC
) $(PIC
) -Wl
,-soname
=$(SONAME
) -o
$(SONAME
) $(LOBJS
) $(LDFLAGS
)
61 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(INC
) -c
-o
$@
$<
64 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(PIC
) $(INC
) -c
-o
$@
$<
66 examples
/micserver.out
: LDFLAGS
+=-lasound
69 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(INC
) -o
$@
$< -L.
-lrocksock
$(LDFLAGS
)
72 .PHONY
: all clean install