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_PROGS
= $(EX_SRCS
:.c
=.out
)
22 CFLAGS
+= -Wall
-std
=c99
-D_GNU_SOURCE
-pipe
25 AR
= $(CROSS_COMPILE
)ar
26 RANLIB
= $(CROSS_COMPILE
)ranlib
28 ALL_INCLUDES
= rocksock.h
32 examples
: $(ALL_LIBS
) $(EX_PROGS
)
37 install: $(ALL_LIBS
:lib
%=$(DESTDIR
)$(libdir)/lib
%) $(ALL_INCLUDES
:%=$(DESTDIR
)$(includedir)/%)
39 $(DESTDIR
)$(libdir)/%: $(ALL_LIBS
)
40 install -D
-m
644 $< $@
42 $(DESTDIR
)$(lincludedir
)/%: $(ALL_INCLUDES
)
43 install -D
-m
644 $< $@
46 $(CC
) $(PIC
) -Wl
,-soname
=$(SONAME
) -o
$(SONAME
) $(LOBJS
) $(LDFLAGS
)
59 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(INC
) -c
-o
$@
$<
62 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(PIC
) $(INC
) -c
-o
$@
$<
65 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(INC
) -o
$@
$< -l
:librocksock.a
$(LDFLAGS
)
68 .PHONY
: all clean install