diff options
author | Johannes Winkelmann <jw@smts.ch> | 2006-04-18 21:14:32 +0000 |
---|---|---|
committer | Johannes Winkelmann <jw@smts.ch> | 2006-04-18 21:14:32 +0000 |
commit | 71a2db495bf77c9d991cfa158daa4a6a96bf9db4 (patch) | |
tree | 367567e5b800a4ac647e3f06e7d3e0cd75972038 /Makefile | |
parent | d4513d341ea794ce101536c89d07af12e9ee151d (diff) | |
download | httpup-71a2db495bf77c9d991cfa158daa4a6a96bf9db4.tar.gz httpup-71a2db495bf77c9d991cfa158daa4a6a96bf9db4.tar.xz |
httpup: various changes
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 94 |
1 files changed, 63 insertions, 31 deletions
@@ -1,43 +1,75 @@ -all: httpup +name=httpup +version=0.4.0i -############################################################################ -### -## Configuration -# -NAME=httpup -VERSION="0.4.0h" -CXX=g++ -CXXFLAGS=-Wall -ansi -pedantic -DMF_VERSION='${VERSION}' -LDFLAGS=-lcurl +prefix= /usr/local +bindir= $(prefix)/bin +libdir= $(prefix)/lib +includedir= $(prefix)/include +mandir= $(prefix)/man -objects=httpupargparser.o argparser.o main.o httpup.o \ - fileutils.o md5.o configparser.o -httpupargparser.o: httpupargparser.cpp httpupargparser.h -argparser.o: argparser.cpp argparser.h -main.o: main.cpp -httpup.o: httpup.cpp httpup.h -fileutils.o: fileutils.cpp fileutils.h -md5.o: md5.cpp md5.h -configparser.o: configparser.cpp configparser.h +CXX= g++ +CXXFLAGS= -O2 -pipe -DMF_VERSION=\"${version}\" +CXXFLAGS+= -g -Wall -Werror +LDFLAGS= -lcurl +INSTALL= /usr/bin/install +STRIP= /usr/bin/strip -############################################################################ -$(objects): %.o: %.cpp - $(CXX) -c $(CXXFLAGS) $< -o $@ +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 -httpup: $(objects) *.cpp *.h - g++ -o httpup $(objects) $(LDFLAGS) +.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 httpup $(objects) + -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: - rm -rf ${NAME}-${VERSION} - mkdir ${NAME}-${VERSION} +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} + httpup-repgen* httpup.conf* $(name)-$(version) + tar cvzf $(name)-$(version).tar.gz $(name)-$(version) + rm -rf $(name)-$(version) |