blob: 5bfc5eab7364d6e2a61f305058faa9e2d1d2fe7b (
plain)
1 name=httpup
2 version=0.5.0
3
4 prefix= /usr/local
5 bindir= $(prefix)/bin
6 libdir= $(prefix)/lib
7 includedir= $(prefix)/include
8 mandir= $(prefix)/man
9
10
11 CXX= g++
12 CXXFLAGS= -O2 -pipe -DMF_VERSION=\"${version}\"
13 CXXFLAGS+= -g -Wall -Werror
14 LDFLAGS= -lcurl
15
16 INSTALL= /usr/bin/install
17 STRIP= /usr/bin/strip
18
19
20 OBJS= httpup.o \
21 fileutils.o \
22 argparser.o \
23 md5.o \
24 httpupargparser.o \
25 configparser.o \
26 main.o
27
28 # # Portability stuff.
29 CXXFLAGS+= -Wno-strict-aliasing
30 # OBJS+= strtonum.o strlcpy.o strlcat.o fgetln.o
31
32 .c.o:
33 $(CC) $(CFLAGS) -c $<
34
35 all: $(name)
36
37
38 $(name): $(OBJS)
39 $(CXX) $(LDFLAGS) $(OBJS) -o $(name)
40
41 distclean: clean
42 -rm -f Makefile config.log config.h *~ *.core core.*
43
44 clean:
45 -rm -f *.o $(name)
46
47
48 install: $(name) $(name).8
49 $(INSTALL) -d $(DESTDIR)$(bindir)
50 $(INSTALL) -d $(DESTDIR)$(mandir)/man8
51 $(INSTALL) -m 755 $(name) $(DESTDIR)$(bindir)/$(name)
52 $(INSTALL) -m 755 httpup-repgen $(DESTDIR)$(bindir)/httpup-repgen
53 $(INSTALL) -m 644 $(name).8 $(DESTDIR)$(mandir)/man8/$(name).8
54 $(INSTALL) -m 644 httpup-repgen.8 \
55 $(DESTDIR)$(mandir)/man8/httpup-repgen.8
56
57 install-strip: install
58 $(STRIP) $(DESTDIR)$(bindir)/$(name)
59
60 uninstall:
61 rm -f \
62 $(DESTDIR)$(bindir)/$(name) \
63 $(DESTDIR)$(mandir)/man1/$(name).8
64
65 rebuild:
66 make clean all
67
68
69 dist: all
70 rm -rf $(name)-$(version)
71 mkdir $(name)-$(version)
72 cp *.cpp *.h Makefile AUTHORS COPYING ChangeLog README TODO *.8 \
73 httpup-repgen* httpup.conf* $(name)-$(version)
74 tar cvzf $(name)-$(version).tar.gz $(name)-$(version)
75 rm -rf $(name)-$(version)
|