$OpenBSD: patch-Src_Makefile,v 1.1.1.1 2001/07/04 15:22:34 lebel Exp $ --- Src/Makefile.orig Tue Jun 19 18:12:44 2001 +++ Src/Makefile Tue Jun 19 18:14:48 2001 @@ -0,0 +1,96 @@ +MIXPATH=${SYSCONFDIR} + +DEF=-DUSE_ZLIB -DUSE_BSAFE +INC=-Ipcre -Ibsafe +LIBS=pcre/libpcre.a bsafe/libbsafe.a +LDFLAGS=-lm -lcrypto -lz + +CFLAGS = -O2 -Wall -static + +ALL_CFLAGS=$(INC) $(DEF) $(OPT) $(CFLAGS) + +CC=gcc + +LIB=ar +RANLIB=ranlib +MAKE=make + +all: mixmaster + +alpha: + $(MAKE) all OPT=-DDECALPHA + +########################################################################## + +OFILES = main.o random.o util.o send.o buffers.o \ + type1.o type2.o chain2.o stats.o keymgt.o \ + compress.o + +.KEEP_STATE: + +clean: + -rm -f *.o mixmaster mixmaster.exe core + +allclean: clean + cd bsafe; make clean + cd zlib; make clean + cd pcre; make clean + +newpass: + -rm -f keymgt.o mixmaster + +mixmaster: $(OFILES) $(LIBS) + $(CC) $(OFILES) $(LIBS) -o mixmaster $(LDFLAGS) + + +main.o: main.c mix.h + $(CC) -c main.c -o main.o $(ALL_CFLAGS) -DSPOOL='"$(MIXPATH)"' + +random.o: random.c mix.h + $(CC) -c random.c -o random.o $(ALL_CFLAGS) + +util.o: util.c mix.h + $(CC) -c util.c -o util.o $(ALL_CFLAGS) + +send.o: send.c mix.h + $(CC) -c send.c -o send.o $(ALL_CFLAGS) + +buffers.o: buffers.c + $(CC) -c buffers.c -o buffers.o $(ALL_CFLAGS) + +type1.o: type1.c mix.h + $(CC) -c type1.c -o type1.o $(ALL_CFLAGS) + +type2.o: type2.c mix.h + $(CC) -c type2.c -o type2.o $(ALL_CFLAGS) + +chain2.o: chain2.c mix.h + $(CC) -c chain2.c -o chain2.o $(ALL_CFLAGS) + +stats.o: stats.c mix.h + $(CC) -c stats.c -o stats.o $(ALL_CFLAGS) + +keymgt.o: keymgt.c mix.h + $(CC) -c keymgt.c -o keymgt.o $(ALL_CFLAGS) -DPASSPHRASE='"$(PASS)"' + +compress.o: compress.c mix.h zlib/zlib.h + $(CC) -c compress.c -o compress.o $(ALL_CFLAGS) + +sockio.o: sockio.c mix.h + $(CC) -c sockio.c -o sockio.o $(ALL_CFLAGS) + +client.o: client.c mix.h + $(CC) -c client.c -o client.o $(ALL_CFLAGS) + +server.o: server.c mix.h + $(CC) -c server.c -o server.o $(ALL_CFLAGS) + +pcre/libpcre.a: + cd pcre; $(MAKE) libpcre.a + +bsafe/libbsafe.a: + cd bsafe; $(MAKE) libbsafe.a + +install: mixmaster + cp mixmaster ${PREFIX}/sbin +