-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
75 lines (55 loc) · 1.49 KB
/
Makefile
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name=httpup
version=0.4.0l
prefix= /usr/local
bindir= $(prefix)/bin
libdir= $(prefix)/lib
includedir= $(prefix)/include
mandir= $(prefix)/man
CXX= g++
CXXFLAGS= -O2 -pipe -DMF_VERSION=\"${version}\"
CXXFLAGS+= -g -Wall -Werror
LDFLAGS= -lcurl
INSTALL= /usr/bin/install
STRIP= /usr/bin/strip
OBJS= httpup.o \
fileutils.o \
argparser.o \
md5.o \
httpupargparser.o \
configparser.o \
main.o
# # Portability stuff.
CXXFLAGS+= -Wno-strict-aliasing
# OBJS+= strtonum.o strlcpy.o strlcat.o fgetln.o
.c.o:
$(CC) $(CFLAGS) -c $<
all: $(name)
$(name): $(OBJS)
$(CXX) $(LDFLAGS) $(OBJS) -o $(name)
distclean: clean
-rm -f Makefile config.log config.h *~ *.core core.*
clean:
-rm -f *.o $(name)
install: $(name) $(name).8
$(INSTALL) -d $(DESTDIR)$(bindir)
$(INSTALL) -d $(DESTDIR)$(mandir)/man8
$(INSTALL) -m 755 $(name) $(DESTDIR)$(bindir)/$(name)
$(INSTALL) -m 755 httpup-repgen $(DESTDIR)$(bindir)/httpup-repgen
$(INSTALL) -m 644 $(name).8 $(DESTDIR)$(mandir)/man8/$(name).8
$(INSTALL) -m 644 httpup-repgen.8 \
$(DESTDIR)$(mandir)/man8/httpup-repgen.8
install-strip: install
$(STRIP) $(DESTDIR)$(bindir)/$(name)
uninstall:
rm -f \
$(DESTDIR)$(bindir)/$(name) \
$(DESTDIR)$(mandir)/man1/$(name).8
rebuild:
make clean all
dist: all
rm -rf $(name)-$(version)
mkdir $(name)-$(version)
cp *.cpp *.h Makefile AUTHORS COPYING ChangeLog README TODO *.8 \
httpup-repgen* httpup.conf* $(name)-$(version)
tar cvzf $(name)-$(version).tar.gz $(name)-$(version)
rm -rf $(name)-$(version)