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
|
# if you want to change/override some variables, do so in a file called
# config.mak, which is gets included automatically if it exists.
prefix = /usr
bindir = $(prefix)/bin
PROG = microsocks
SRCS = sockssrv.c server.c sblist.c sblist_delete.c
OBJS = $(SRCS:.c=.o)
LIBS = -lpthread
CFLAGS += -Wall -std=c99
INSTALL = ./install.sh
-include config.mak
all: $(PROG)
install: $(PROG)
$(INSTALL) -D -m 755 $(PROG) $(DESTDIR)$(bindir)/$(PROG)
clean:
rm -f $(PROG)
rm -f $(OBJS)
%.o: %.c
$(CC) $(CPPFLAGS) $(CFLAGS) $(INC) $(PIC) -c -o $@ $<
$(PROG): $(OBJS)
$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
.PHONY: all clean install
|