Imported Upstream version 1.6.1
[platform/upstream/fdupes.git] / Makefile
1 #
2 # fdupes Makefile
3 #
4
5 #####################################################################
6 # Standand User Configuration Section                               #
7 #####################################################################
8
9 #
10 # PREFIX indicates the base directory used as the basis for the 
11 # determination of the actual installation directories.
12 # Suggested values are "/usr/local", "/usr", "/pkgs/fdupes-$(VERSION)"
13 #
14 PREFIX = /usr/local
15
16 #
17 # When compiling for 32-bit systems, FILEOFFSET_64BIT must be enabled
18 # for fdupes to handle files greater than (2<<31)-1 bytes.
19 #
20 FILEOFFSET_64BIT = -D_FILE_OFFSET_BITS=64
21
22 #
23 # Certain platforms do not support long options (command line options).
24 # To disable long options, uncomment the following line.
25 #
26 #OMIT_GETOPT_LONG = -DOMIT_GETOPT_LONG
27
28 #####################################################################
29 # Developer Configuration Section                                   #
30 #####################################################################
31
32 #
33 # VERSION determines the program's version number.
34 #
35 include Makefile.inc/VERSION
36
37 #
38 # PROGRAM_NAME determines the installation name and manual page name
39 #
40 PROGRAM_NAME=fdupes
41
42 #
43 # BIN_DIR indicates directory where program is to be installed. 
44 # Suggested value is "$(PREFIX)/bin"
45 #
46 BIN_DIR = $(PREFIX)/bin
47
48 #
49 # MAN_DIR indicates directory where the fdupes man page is to be 
50 # installed. Suggested value is "$(PREFIX)/man/man1"
51 #
52 MAN_BASE_DIR = $(PREFIX)/share/man
53 MAN_DIR = $(MAN_BASE_DIR)/man1
54 MAN_EXT = 1
55
56 #
57 # Required External Tools
58 #
59
60 INSTALL = install       # install : UCB/GNU Install compatiable
61 #INSTALL = ginstall
62
63 RM      = rm -f
64
65 MKDIR   = mkdir -p
66 #MKDIR   = mkdirhier 
67 #MKDIR   = mkinstalldirs
68
69
70 #
71 # Make Configuration
72 #
73 CC ?= gcc
74 COMPILER_OPTIONS = -Wall -O -g
75
76 CFLAGS= $(COMPILER_OPTIONS) -I. -DVERSION=\"$(VERSION)\" $(OMIT_GETOPT_LONG) $(FILEOFFSET_64BIT)
77
78 INSTALL_PROGRAM = $(INSTALL) -c -m 0755
79 INSTALL_DATA    = $(INSTALL) -c -m 0644
80
81 #
82 # ADDITIONAL_OBJECTS - some platforms will need additional object files
83 # to support features not supplied by their vendor. Eg: GNU getopt()
84 #
85 #ADDITIONAL_OBJECTS = getopt.o
86
87 OBJECT_FILES = fdupes.o md5/md5.o $(ADDITIONAL_OBJECTS)
88
89 #####################################################################
90 # no need to modify anything beyond this point                      #
91 #####################################################################
92
93 all: fdupes
94
95 fdupes: $(OBJECT_FILES)
96         $(CC) $(CFLAGS) $(LDFLAGS) -o fdupes $(OBJECT_FILES)
97
98 installdirs:
99         test -d $(DESTDIR)$(BIN_DIR) || $(MKDIR) $(DESTDIR)$(BIN_DIR)
100         test -d $(DESTDIR)$(MAN_DIR) || $(MKDIR) $(DESTDIR)$(MAN_DIR)
101
102 install: fdupes installdirs
103         $(INSTALL_PROGRAM)      fdupes   $(DESTDIR)$(BIN_DIR)/$(PROGRAM_NAME)
104         $(INSTALL_DATA)         fdupes.1 $(DESTDIR)$(MAN_DIR)/$(PROGRAM_NAME).$(MAN_EXT)
105
106 clean:
107         $(RM) $(OBJECT_FILES)
108         $(RM) fdupes
109         $(RM) *~ md5/*~
110
111 love:
112         @echo You\'re not my type. Go find a human partner.