tools

various tools
git clone git://deadbeef.fr/merge.git
Log | Files | Refs | README | LICENSE

Makefile (731B)


      1 CC     ?= cc
      2 CXX    ?= c++
      3 PREFIX ?= "/usr/local"
      4 
      5 all: manpages lmerge.1 lmerge
      6 
      7 %.1: doc/%.1.md
      8 	pandoc -s --to=man $< -o $@
      9 
     10 lmerge.o: src/lmerge.cpp
     11 	$(CXX) -I ../btl/src -DFILE_PTR='FILE*' $(CXXFLAGS) -c $< -o $@
     12 
     13 %.o: ../btl/src/%.cpp
     14 	$(CXX) $(CXXFLAGS)  -DFILE_PTR='FILE*' -c $< -o $@
     15 
     16 lmerge: lmerge.o optparser.o utils.o
     17 	$(CXX) -o $@ $^
     18 
     19 manpages: lmerge.1
     20 
     21 clean:
     22 	rm -f lmerge lmerge.1 *.o
     23 
     24 install: all
     25 	mkdir -p ${DESTDIR}${PREFIX}/bin/ ${DESTDIR}${PREFIX}/share/man/man1/
     26 	install -m 755 lmerge   ${DESTDIR}${PREFIX}/bin/
     27 	install -m 644 lmerge.1 ${DESTDIR}${PREFIX}/share/man/man1/
     28 
     29 uninstall:
     30 	rm ${DESTDIR}${PREFIX}/bin/lmerge
     31 	rm ${DESTDIR}${PREFIX}/share/man/man1/lmerge.1
     32 
     33 .PHONY: all clean install uninstall