aboutsummaryrefslogtreecommitdiffstats
path: root/biology/flash/files/patch-Makefile
blob: 79852777bb6b68b042b7e13d7c0c680b782b79ae (plain) (blame)
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
--- Makefile.orig	2014-08-04 23:18:10 UTC
+++ Makefile
@@ -7,12 +7,21 @@
 # use a non-default compiler, extra preprocessor flags (e.g. to find headers),
 # or extra linker flags (e.g. to find libraries).
 
-CFLAGS += -O2 -Wall -std=c99 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+# Let env set optimization and warning level, then add required flags
+CFLAGS ?= -O2 -Wall
+CFLAGS += -std=c99 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
 LDLIBS := -lz -lpthread
 OBJ    := combine_reads.o flash.o iostream.o read_io.o read_queue.o read_util.o util.o
 EXE    := flash
 
+MKDIR	?= mkdir
+INSTALL	?= install
+
 $(EXE):$(OBJ)
+
+install:
+	${MKDIR} -p ${DESTDIR}${PREFIX}/bin
+	${INSTALL} -c flash ${DESTDIR}${PREFIX}/bin
 
 clean:
 	rm -f $(OBJ) $(EXE)