Makefile.in 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. # Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
  2. # Copyright (C) 1994,1995 Ian Jackson <ijackson@nyx.cs.du.edu>
  3. #
  4. # This is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as
  6. # published by the Free Software Foundation; either version 2,
  7. # or (at your option) any later version.
  8. #
  9. # This is distributed in the hope that it will be useful, but
  10. # WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public
  15. # License along with dpkg; if not, write to the Free Software
  16. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17. srcdir = @srcdir@
  18. VPATH = @srcdir@
  19. prefix = @prefix@
  20. exec_prefix = $(prefix)
  21. bindir = $(exec_prefix)/bin
  22. libdir = $(prefix)/lib
  23. mandir = $(prefix)/man
  24. man8dir = $(mandir)/man8
  25. man8 = 8
  26. SRC = main.c enquiry.c filesdb.c archives.c processarc.c cleanup.c select.c \
  27. packages.c configure.c remove.c help.c depcon.c errors.c update.c
  28. OBJ = main.o enquiry.o filesdb.o archives.o processarc.o cleanup.o select.o \
  29. packages.o configure.o remove.o help.o depcon.o errors.o update.o
  30. INSTALL = @INSTALL@
  31. INSTALL_PROGRAM = @INSTALL_PROGRAM@
  32. INSTALL_DATA = @INSTALL_DATA@
  33. CC = @CC@
  34. CFLAGS = @CFLAGS@ @CWARNS@ -g $(XCFLAGS)
  35. OPTCFLAGS = @OPTCFLAGS@
  36. LDFLAGS = $(XLDFLAGS)
  37. LIBS = -L../lib -ldpkg $(XLIBS)
  38. ALL_CFLAGS = -I../include -I.. @DEFS@ $(CFLAGS)
  39. ALL_CFLAGS_OPT = $(ALL_CFLAGS) $(OPTCFLAGS)
  40. .SUFFIXES: .c .o
  41. .c.o:
  42. $(CC) $(ALL_CFLAGS) -c $<
  43. all: dpkg
  44. dpkg: $(OBJ) ../lib/libdpkg.a
  45. $(CC) $(LDFLAGS) -o dpkg $(OBJ) $(LIBS)
  46. # This next file is very heavily used, and should be optimised
  47. # for speed rather than space. (ALL_CFLAGS_OPT usually means -O3.)
  48. filesdb.o: filesdb.c
  49. $(CC) $(ALL_CFLAGS_OPT) -c $<
  50. archtable.inc: ../archtable
  51. expand ../archtable | \
  52. perl -ne 'print " { \"$$1\",$$2\"$$3\",$$4\"$$5\" },\n" \
  53. if m/^\s*(\w+)(\s+)(\w+)(\s+)(\w+)\s*$$/' \
  54. >archtable.inc.new
  55. mv archtable.inc.new archtable.inc
  56. clean:
  57. rm -f *.o core dpkg *.new archtable.inc
  58. distclean: clean
  59. rm -f Makefile *.orig *~ *.~* ./#*#
  60. rm -rf t updates status available *.old
  61. install: all
  62. $(INSTALL_PROGRAM) -s dpkg $(bindir)/dpkg
  63. $(INSTALL_DATA) dpkg.8 $(man8dir)/dpkg.$(man8)
  64. $(OBJ): main.h ../config.h ../include/dpkg.h ../include/dpkg-db.h
  65. main.o: ../version.h
  66. main.o enquiry.o errors.o update.o: ../include/myopt.h
  67. enquiry.o: filesdb.h archtable.inc
  68. filesdb.o: filesdb.h
  69. packages.o remove.o configure.o: filesdb.h ../include/myopt.h
  70. archives.o processarc.o help.o: filesdb.h ../include/myopt.h
  71. archives.o processarc.o: archives.h ../include/tarfn.h