2 # make - twidle the options yourself :-)
3 # make cc - standard cc options
4 # make gcc - standard gcc options
5 # make x86-elf - linux-elf etc
6 # make x86-out - linux-a.out, FreeBSD etc
13 CFLAG= -O3 -fomit-frame-pointer
17 INSTALLTOP=/usr/local/lib
19 MAKEDEPEND= makedepend
20 MAKEFILE= Makefile.uni
25 CFLAGS= $(INCLUDES) $(CFLAG)
34 TEST=$(TEST1) $(TEST2)
38 LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
39 LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA_ASM_OBJ)
44 HEADER= sha_locl.h $(EXHEADER)
46 ALL= $(GENERAL) $(SRC) $(HEADER)
48 all: $(LIB) $(TEST) $(APPS)
51 $(AR) $(LIB) $(LIBOBJ)
55 asm/sx86-elf.o: asm/sx86unix.cpp
56 $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o
59 asm/sx86-sol.o: asm/sx86unix.cpp
60 $(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s
61 as -o asm/sx86-sol.o asm/sx86-sol.s
65 asm/sx86-out.o: asm/sx86unix.cpp
66 $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
69 asm/sx86bsdi.o: asm/sx86unix.cpp
70 $(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o
73 (cd asm; perl sha1-586.pl cpp >sx86unix.cpp)
79 $(TEST1): $(TEST1).c $(LIB)
80 $(CC) -o $(TEST1) $(CFLAGS) $(TEST1).c $(LIB)
82 $(TEST2): $(TEST2).c $(LIB)
83 $(CC) -o $(TEST2) $(CFLAGS) $(TEST2).c $(LIB)
85 $(APP1): $(APP1).c $(LIB)
86 $(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB)
88 $(APP2): $(APP2).c $(LIB)
89 $(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB)
92 lint -DLINT $(INCLUDES) $(SRC)>fluff
95 $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC)
98 perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
99 mv -f Makefile.new $(MAKEFILE)
102 /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
105 $(MAKE) SHA_ASM_OBJ="" CC="cc" CFLAG="-O" all
108 $(MAKE) SHA_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all
111 $(MAKE) SHA_ASM_OBJ="asm/sx86-elf.o" CFLAG="-DELF -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
114 $(MAKE) SHA_ASM_OBJ="asm/sx86-out.o" CFLAG="-DOUT -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
117 $(MAKE) SHA_ASM_OBJ="asm/sx86-sol.o" CFLAG="-DSOL -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
120 $(MAKE) SHA_ASM_OBJ="asm/sx86-bdsi.o" CFLAG="-DBDSI -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all
122 # DO NOT DELETE THIS LINE -- make depend depends on it.