Makefile 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. srcdir = .
  2. top_srcdir = ..
  3. default: all
  4. include ../Makefile.conf
  5. SPLIT_SOURCES = queue.c split.c info.c join.c main.c
  6. SPLIT_OBJECTS = $(patsubst %.c, %.o, $(SPLIT_SOURCES))
  7. GENFILES = $(SPLIT_OBJECTS) dpkg-split
  8. .PHONY: all
  9. all:: dpkg-split
  10. .PHONY: install
  11. install:: all
  12. .PHONY: clean
  13. clean::
  14. $(RM) $(GENFILES)
  15. .PHONY: distclean
  16. cvslean:: clean
  17. $(RM) Makefile
  18. .PHONY: install
  19. install:: install-program install-doc
  20. .PHONY: install-program
  21. install-program:
  22. $(mkinstalldirs) $(DESTDIR)/$(bindir)
  23. $(INSTALL) dpkg-split $(DESTDIR)$(bindir)
  24. $(mkinstalldirs) $(DESTDIR)/$(admindir)/parts
  25. $(mkinstalldirs) $(DESTDIR)/$(dpkglibdir)
  26. $(INSTALL) $(srcdir)/mksplit.pl $(DESTDIR)/$(dpkglibdir)/mksplit
  27. .PHONY: install-doc
  28. install-doc:
  29. $(mkinstalldirs) $(DESTDIR)/$(man8dir)
  30. $(INSTALL_DATA) $(srcdir)/dpkg-split.8 $(DESTDIR)/$(man8dir)
  31. dpkg-split: $(SPLIT_OBJECTS)
  32. $(CC) $(LDFLAGS) -o $@ $(SPLIT_OBJECTS) $(LIBS) $(NLS_LIBS)
  33. split.o: split.c
  34. $(CC) $(ALL_CFLAGS) -DMKSPLITSCRIPT=\"$(dpkglibdir)/mksplit\" -c $<