-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
89 lines (60 loc) · 2.45 KB
/
Makefile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
#
# Makefile for the Offline NT Password Editor
#
#
# Change here to point to the needed OpenSSL libraries & .h files
# See INSTALL for more info.
#
#SSLPATH=/usr/local/ssl
OSSLPATH=/usr
OSSLINC=$(OSSLPATH)/include
CC=gcc
# Force 32 bit
CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall -m32
OSSLLIB=$(OSSLPATH)/lib
# 64 bit if default for compiler setup
#CFLAGS= -DUSEOPENSSL -g -I. -I$(OSSLINC) -Wall
#OSSLLIB=$(OSSLPATH)/lib64
# This is to link with whatever we have, SSL crypto lib we put in static
#LIBS=-L$(OSSLLIB) $(OSSLLIB)/libcrypto.a
LIBS=-L$(OSSLLIB)
PREFIX=/usr/local
INSTALL=install
all: chntpw cpnt reged samusrgrp sampasswd samunlock
chntpw: chntpw.o ntreg.o edlib.o libsam.o
$(CC) $(CFLAGS) -o chntpw chntpw.o ntreg.o edlib.o libsam.o $(LIBS)
chntpw.static: chntpw.o ntreg.o edlib.o libsam.o
$(CC) -static $(CFLAGS) -o chntpw.static chntpw.o ntreg.o edlib.o libsam.o $(LIBS)
cpnt: cpnt.o
$(CC) $(CFLAGS) -o cpnt cpnt.o $(LIBS)
reged: reged.o ntreg.o edlib.o
$(CC) $(CFLAGS) -o reged reged.o ntreg.o edlib.o
reged.static: reged.o ntreg.o edlib.o
$(CC) -static $(CFLAGS) -o reged.static reged.o ntreg.o edlib.o
samusrgrp.static: samusrgrp.o ntreg.o libsam.o
$(CC) -static $(CFLAGS) -o samusrgrp.static samusrgrp.o ntreg.o libsam.o
samusrgrp: samusrgrp.o ntreg.o libsam.o
$(CC) $(CFLAGS) -o samusrgrp samusrgrp.o ntreg.o libsam.o
sampasswd: sampasswd.o ntreg.o libsam.o
$(CC) $(CFLAGS) -o sampasswd sampasswd.o ntreg.o libsam.o
sampasswd.static: sampasswd.o ntreg.o libsam.o
$(CC) -static $(CFLAGS) -o sampasswd.static sampasswd.o ntreg.o libsam.o
samunlock: samunlock.o ntreg.o libsam.o
$(CC) $(CFLAGS) -o samunlock samunlock.o ntreg.o libsam.o
samunlock.static: samunlock.o ntreg.o libsam.o
$(CC) -static $(CFLAGS) -o samunlock.static samunlock.o ntreg.o libsam.o
#ts: ts.o ntreg.o
# $(CC) $(CFLAGS) -nostdlib -o ts ts.o ntreg.o $(LIBS)
# -Wl,-t
.c.o:
$(CC) -c $(CFLAGS) $<
docs:
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/doc/chntpw
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/share/man/man8
$(INSTALL) -m 0644 COPYING.txt GPL.txt HISTORY.txt INSTALL.txt LGPL.txt MANUAL.txt README.txt regedit.txt syskey.txt WinReg.txt $(DESTDIR)$(PREFIX)/share/doc/chntpw
$(INSTALL) -m 0644 man/*.8 $(DESTDIR)$(PREFIX)/share/man/man8
install: all docs
$(INSTALL) -d -m 0755 $(DESTDIR)$(PREFIX)/bin
$(INSTALL) -m 0755 chntpw reged samusrgrp sampasswd samunlock $(DESTDIR)$(PREFIX)/bin
clean:
rm -f *.o chntpw cpnt reged samusrgrp sampasswd samunlock *~