-
Notifications
You must be signed in to change notification settings - Fork 21
/
Makefile.xlc
49 lines (42 loc) · 1.6 KB
/
Makefile.xlc
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
#
# You can tweak these three variables to make things install where you
# like, but do not touch more unless you know what you are doing. ;)
#
SYSCONFDIR=/usr/local/etc
BINDIR=/usr/local/bin
MANDIR=/usr/local/man
#
#
CC=xlc_r
OBJS=utils.o ntlm.o xcrypt.o config.o socket.o acl.o auth.o http.o forward.o direct.o scanner.o pages.o main.o
CFLAGS=$(FLAGS) -O3 -D_POSIX_C_SOURCE=200112 -D_ISOC99_SOURCE -D_REENTRANT -DVERSION=\"`cat VERSION`\"
LDFLAGS=-lpthread
NAME=cntlm
$(NAME): $(OBJS)
$(CC) $(CFLAGS) -o $@ $(OBJS) $(LDFLAGS)
main.o: main.c
if [ -z "$(SYSCONFDIR)" ]; then \
$(CC) $(CFLAGS) -c main.c -o $@; \
else \
$(CC) $(CFLAGS) -DSYSCONFDIR=\"$(SYSCONFDIR)\" -c main.c -o $@; \
fi
install: $(NAME)
if [ -f /usr/bin/oslevel ]; then \
install -M 0755 -S -f $(BINDIR) $(NAME); \
install -M 0644 -f $(MANDIR)/man1 doc/$(NAME).1; \
install -M 0600 -c $(SYSCONFDIR) doc/$(NAME).conf; \
else \
install -D -m 0755 -s $(NAME) $(BINDIR)/$(NAME); \
install -D -m 0644 doc/$(NAME).1 $(MANDIR)/man1/$(NAME).1; \
[ -f $(SYSCONFDIR)/$(NAME).conf -o -z "$(SYSCONFDIR)" ] \
|| install -D -m 0600 doc/$(NAME).conf $(SYSCONFDIR)/$(NAME).conf; \
fi
uninstall:
rm -f $(BINDIR)/$(NAME) $(MANDIR)/man1/$(NAME).1 2>/dev/null || true
clean:
@rm -f *.o cntlm cntlm.exe configure-stamp build-stamp config/config.h 2>/dev/null
@rm -f cntlm-install win/cyg* win/cntlm* 2>/dev/null
@rm -f config/endian config/gethostname config/strdup config/socklen_t config/*.exe
@if [ -h Makefile ]; then rm -f Makefile; mv Makefile.gcc Makefile; fi
distclean: clean
@rm -f *.deb *.rpm *.tgz *.tar.gz *.tar.bz2 tags ctags pid 2>/dev/null