# remove 'md5' from all in linux SRCDIR=/usr/local/tmp/crp SAMBA=/usr/local/tmp/samba-2.0.9/source all: md5 crp #CC=cc CC=gcc MD5=$(SRCDIR)/md5crypt-1.0/crypt_md5.o $(SRCDIR)/md5crypt-1.0/md5.o ######### Select your OS / available methods #### Linux DEFINES= -DMY_BIGCRYPT -DUSE_BIGCRYPT -DUSE_MD5 \ -DMY_CRYPT16 -DUSE_CRYPT16 -DUSE_SMB \ -D USE_CRYPT_RN CFLAGS= -O -I$(SRCDIR)/ufc-crypt -I$(SRCDIR)/md5crypt-1.0 $(DEFINES) LDFLAGS= LDLIBS= $(MD5) $(SRCDIR)/ufc-crypt/crypt_util.o $(SRCDIR)/ufc-crypt/crypt.o -lcrypt #### Linux, older #DEFINES= -DMY_BIGCRYPT -DUSE_BIGCRYPT \ # -DMY_CRYPT16 -DUSE_CRYPT16 -DUSE_SMB #CFLAGS= -O -I$(SRCDIR)/ufc-crypt $(DEFINES) #LDFLAGS= #LDLIBS= $(SRCDIR)/ufc-crypt/crypt_util.o $(SRCDIR)/ufc-crypt/crypt.o -lcrypt -ldl -lnsl # #### Linux Alpha #CC=ccc #CFLAGS= -fast -O4 $(DEFINES) #### Tru64 5.0 #DEFINES= -DUSE_BIGCRYPT -DUSE_MD5 #CFLAGS= -O $(DEFINES) #LDFLAGS= #LDLIBS= $(MD5) -lsecurity #### HP-UX 9 #DEFINES=-DUSE_MD5 -DMY_CRYPT16 -DUSE_CRYPT16 \ # -DMY_BIGCRYPT #CFLAGS= -Aa -D_HPUX_SOURCE -O -I./ufc-crypt $(DEFINES) #LDFLAGS= -L./ufc-crypt #LDLIBS= $(MD5) -lufc #### HP-UX 11 #DEFINES=-DUSE_MD5 -DMY_CRYPT16 -DUSE_CRYPT16 #CFLAGS= -Ae -O -I./ufc-crypt $(DEFINES) #LDLIBS= $(MD5) -lufc -lsec #### Solaris 2.x #### IRIX 6.2 #DEFINES= -DMY_BIGCRYPT -DUSE_BIGCRYPT \ # -DMY_CRYPT16 -DUSE_CRYPT16 \ # -DUSE_MD5 -DUSE_SMB # #CFLAGS= -O -I/usr/local/include -I$(SRCDIR)/md5crypt-1.0 -I$(SRCDIR)/ufc-crypt $(DEFINES) #LDFLAGS= -L/usr/local/lib #LDLIBS= -L$(SRCDIR)/ufc-crypt -lufc $(MD5) -lsec -lgen -lsocket -lnsl -ldl #### Darwin # #DEFINES= -DMY_BIGCRYPT -DUSE_BIGCRYPT \ # -DMY_CRYPT16 -DUSE_CRYPT16 -DUSE_MD5 -DUSE_SMB # #CFLAGS= -O -I$(SRCDIR)/ufc-crypt $(DEFINES) #LDFLAGS= #LDLIBS= $(MD5) $(SRCDIR)/ufc-crypt/crypt_util.o $(SRCDIR)/ufc-crypt/crypt.o ######### End of OS/options # copied from $(SAMBA)/Makefile ###################################################################### # object file lists ###################################################################### TDBBASE_OBJ = TDB_OBJ = $(TDBBASE_OBJ) LIB_OBJ = lib/slprintf.o lib/charcnv.o lib/charset.o lib/debug.o lib/fault.o \ lib/doscalls.o \ lib/getsmbpass.o lib/interface.o lib/kanji.o lib/md4.o \ lib/interfaces.o lib/pidfile.o lib/replace.o \ lib/signal.o lib/system.o lib/time.o \ lib/ufc.o lib/genrand.o lib/username.o lib/access.o \ lib/smbrun.o \ lib/bitmap.o lib/crc32.o lib/snprintf.o \ lib/util_str.o lib/util_sid.o \ lib/util_unistr.o lib/util_file.o \ lib/util.o lib/util_sock.o lib/util_sec.o smbd/ssl.o \ lib/talloc.o lib/hash.o \ $(TDB_OBJ) UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \ ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o ubiqx/debugparse.o PARAM_OBJ = param/loadparm.o param/params.o LIBSMB_OBJ = libsmb/clientgen.o \ libsmb/namequery.o libsmb/nmblib.o \ libsmb/nterr.o libsmb/smbdes.o libsmb/smbencrypt.o \ libsmb/smberr.o libsmb/credentials.o libsmb/pwd_cache.o \ libsmb/passchange.o $(RPC_PARSE_OBJ1) RPC_PARSE_OBJ1 = rpc_parse/parse_prs.o rpc_parse/parse_sec.o \ rpc_parse/parse_misc.o ###################################################################### SMB_OBJ = $(LIB_OBJ) $(PARAM_OBJ) $(UBIQX_OBJ) $(LIBSMB_OBJ) # Select this if not using USE_SMB and comment out the crp line below ####.c: #### $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) $(LDLIBS) #crp: crp.o ntlm.o # $(CC) $(CFLAGS) -o $(SRCDIR)/crp $(SRCDIR)/crp.c $(LDFLAGS) $(LDLIBS) crp: crp.c sh -c "\ cd $(SAMBA) && \ $(CC) $(CFLAGS) -I$(SAMBA)/smbwrapper -I$(SAMBA)/ubiqx -I$(SAMBA)/include -o $(SRCDIR)/crp $(SRCDIR)/crp.c $(LDFLAGS) $(SMB_OBJ) $(LDLIBS)" # # End of configurable options. # #ntlm.o: ntlm.c # $(CC) $(CFLAGS) -c -o ntlm.o ntlm.c md5: ./md5crypt-1.0/crypt_md5.o ./md5crypt-1.0/md5.o ./md5crypt-1.0/md5.o: (cd md5crypt-1.0; make md5.o) ./md5crypt-1.0/crypt_md5.o: (cd md5crypt-1.0; make crypt_md5.o) clean: rm -f crp crp.o ntlm.o (cd md5crypt-1.0; make clean) dist: gtar -C .. -cpvzf crp-0.1.tgz crp/Makefile crp/README crp/crp.c crp/ntlm.c crp/md5crypt-1.0.patch