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
/rocksock_test2.c examples
/rocksock_test3.c
21 EX_PROGS
= $(EX_SRCS
:.c
=.out
)
23 CFLAGS
+= -Wall
-std
=c99
-D_GNU_SOURCE
-pipe
26 AR
= $(CROSS_COMPILE
)ar
27 RANLIB
= $(CROSS_COMPILE
)ranlib
29 ALL_INCLUDES
= rocksock.h
33 examples
: $(ALL_LIBS
) $(EX_PROGS
)
38 install: $(ALL_LIBS
:lib
%=$(DESTDIR
)$(libdir)/lib
%) $(ALL_INCLUDES
:%=$(DESTDIR
)$(includedir)/%)
40 $(DESTDIR
)$(libdir)/%: $(ALL_LIBS
)
41 install -D
-m
644 $< $@
43 $(DESTDIR
)$(lincludedir
)/%: $(ALL_INCLUDES
)
44 install -D
-m
644 $< $@
47 $(CC
) $(PIC
) -Wl
,-soname
=$(SONAME
) -o
$(SONAME
) $(LOBJS
) $(LDFLAGS
)
60 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(INC
) -c
-o
$@
$<
63 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(PIC
) $(INC
) -c
-o
$@
$<
65 examples
/micserver.out
: LDFLAGS
+=-lasound
68 $(CC
) $(CPPFLAGS
) $(CFLAGS
) $(INC
) -o
$@
$< -L.
-lrocksock
$(LDFLAGS
)
71 .PHONY
: all clean install