File: makefile-install

package info (click to toggle)
fsmark 3.3-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: ansic: 1,146; makefile: 100
file content (29 lines) | stat: -rw-r--r-- 862 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Description: Add install target with $(DESTDIR) support.
  This patch adds a install target to the makefile which
  installs the binary to $(DESTDIR)/usr/bin.
Author: Martin Steigerwald <ms@teamix.de>

Index: fsmark/Makefile
===================================================================
--- fsmark.orig/Makefile	2012-01-09 15:44:04.043832167 +0100
+++ fsmark/Makefile	2012-01-09 16:31:32.335726257 +0100
@@ -12,6 +12,8 @@
 COBJS= fs_mark.o lib_timing.o
 CFLAGS= -O2 -Wall -D_FILE_OFFSET_BITS=64
 
+BIN=$(DESTDIR)/usr/bin
+
 all: fs_mark 
 
 fs_mark.o: fs_mark.c fs_mark.h
@@ -19,6 +21,10 @@
 fs_mark: fs_mark.o lib_timing.o
 	${CC} -static -o fs_mark fs_mark.o lib_timing.o
 
+install:
+	install -d $(BIN)
+	install ./fs_mark $(BIN)
+
 test: fs_mark
 	./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096
 	./fs_mark -d ${DIR1} -d ${DIR2} -s 51200 -n 4096 -r