70bc6a2e7e
Changelog: dmg2img-1.6.5: 23 July 2013 vu1tur Fixed a bug in handling some types of dmg files dmg2img-1.6.4: 25 April 2012 vu1tur Compilation bugfix (Linux) dmg2img-1.6.3: 07 April 2012 vu1tur Added option -l to list partitions Added option -p to extract only specific partition Added support for a rare case scenario of koly block being at the the beginning of the image (thanks to Friik) dmg2img-1.6.2: 24 March 2010 vu1tur Fixed a bug in processing a terminal block type Added periodic flushing of debug log file
38 lines
1.1 KiB
Text
38 lines
1.1 KiB
Text
$NetBSD: patch-aa,v 1.3 2016/03/07 20:17:33 nros Exp $
|
|
|
|
Respect any CFLAGS from the environment, use LDFLAGS and install to
|
|
${PREFIX}/bin using ${BSD_INSTALL_PROGRAM}
|
|
|
|
--- Makefile.orig 2010-03-24 19:38:08.000000000 +0000
|
|
+++ Makefile
|
|
@@ -1,11 +1,12 @@
|
|
#CC = gcc
|
|
-CFLAGS = -O2 -Wall
|
|
-BIN_DIR = ${DESTDIR}/usr/bin
|
|
+CFLAGS?= -O2
|
|
+CFLAGS+= -Wall
|
|
+BIN_DIR = ${DESTDIR}${PREFIX}/bin
|
|
|
|
all: dmg2img vfdecrypt
|
|
|
|
dmg2img: dmg2img.c dmg2img.h mntcmd.h gpt.h dmg2img.o base64.o adc.o
|
|
- $(CC) -s -o dmg2img dmg2img.o base64.o adc.o -L. -lz -lbz2
|
|
+ $(CC) $(LDFLAGS) -o dmg2img dmg2img.o base64.o adc.o -L. -lz -lbz2
|
|
|
|
dmg2img.o: dmg2img.c dmg2img.h
|
|
$(CC) $(CFLAGS) -c dmg2img.c
|
|
@@ -17,11 +18,12 @@ adc.o: adc.c adc.h
|
|
$(CC) $(CFLAGS) -c adc.c
|
|
|
|
vfdecrypt: vfdecrypt.c
|
|
- $(CC) $(CFLAGS) -s -o vfdecrypt vfdecrypt.c -lcrypto
|
|
+ $(CC) $(CFLAGS) $(LDFLAGS) -o vfdecrypt vfdecrypt.c -lcrypto
|
|
|
|
install: dmg2img vfdecrypt
|
|
mkdir -p ${BIN_DIR}
|
|
- install -c -s -m 755 -o root -g root dmg2img vfdecrypt $(BIN_DIR)
|
|
+ ${BSD_INSTALL_PROGRAM} -c dmg2img $(BIN_DIR)
|
|
+ ${BSD_INSTALL_PROGRAM} -c vfdecrypt $(BIN_DIR)
|
|
|
|
clean:
|
|
rm -f dmg2img vfdecrypt *~ *.o core
|