Move Makefiles to Makefile.in
[openssl.git] / demos / engines / rsaref / Makefile.in
1 LIBNAME=        librsaref
2 SRC=            rsaref.c
3 OBJ=            rsaref.o
4 HEADER=         rsaref.h
5
6 CC=             gcc
7 PIC=            -fPIC
8 CFLAGS=         -g -I../../../include $(PIC) -DENGINE_DYNAMIC_SUPPORT
9 AR=             ar r
10 RANLIB=         ranlib
11
12 LIB=            $(LIBNAME).a
13 SHLIB=          $(LIBNAME).so
14
15 all:
16                 @echo 'Please choose a system to build on:'
17                 @echo ''
18                 @echo 'tru64:    Tru64 Unix, Digital Unix, Digital OSF/1'
19                 @echo 'solaris:  Solaris'
20                 @echo 'irix:     IRIX'
21                 @echo 'hpux32:   32-bit HP/UX'
22                 @echo 'hpux64:   64-bit HP/UX'
23                 @echo 'aix:      AIX'
24                 @echo 'gnu:      Generic GNU-based system (gcc and GNU ld)'
25                 @echo ''
26
27 FORCE.install:
28 install:        FORCE.install
29                 cd install; \
30                         make -f unix/makefile CFLAGS='-I. -DPROTOTYPES=1 -O -c' RSAREFLIB=librsaref.a librsaref.a
31
32 FORCE.update:
33 update:         FORCE.update
34                 perl ../../../util/mkerr.pl -conf rsaref.ec \
35                         -nostatic -staticloader -write rsaref.c
36
37 darwin:         install $(SHLIB).darwin
38 cygwin:         install $(SHLIB).cygwin
39 gnu:            install $(SHLIB).gnu
40 alpha-osf1:     install $(SHLIB).alpha-osf1
41 tru64:          install $(SHLIB).tru64
42 solaris:        install $(SHLIB).solaris
43 irix:           install $(SHLIB).irix
44 hpux32:         install $(SHLIB).hpux32
45 hpux64:         install $(SHLIB).hpux64
46 aix:            install $(SHLIB).aix
47 reliantunix:    install $(SHLIB).reliantunix
48
49 $(LIB):         $(OBJ)
50                 $(AR) $(LIB) $(OBJ)
51                 - $(RANLIB) $(LIB)
52
53 LINK_SO=        \
54   ld -r -o $(LIBNAME).o $$ALLSYMSFLAGS $(LIB) install/librsaref.a && \
55   (nm -Pg $(LIBNAME).o | grep ' [BDT] ' | cut -f1 -d' ' > $(LIBNAME).exp; \
56    $$SHAREDCMD $$SHAREDFLAGS -o $(SHLIB) $(LIBNAME).o -L ../../.. -lcrypto -lc)
57
58 $(SHLIB).darwin:        $(LIB) install/librsaref.a
59                 ALLSYMSFLAGS='-all_load' \
60                 SHAREDFLAGS='-dynamiclib -install_name $(SHLIB)' \
61                 SHAREDCMD='$(CC)'; \
62                 $(LINK_SO)
63                 touch $(SHLIB).darwin
64 $(SHLIB).cygwin:        $(LIB) install/librsaref.a
65                 ALLSYMSFLAGS='--whole-archive' \
66                 SHAREDFLAGS='-shared -Wl,-Bsymbolic -Wl,--out-implib,$(LIBNAME).dll.a' \
67                 SHAREDCMD='$(CC)'; \
68                 $(LINK_SO)
69                 touch $(SHLIB).cygwin
70 $(SHLIB).gnu:   $(LIB) install/librsaref.a
71                 ALLSYMSFLAGS='--whole-archive' \
72                 SHAREDFLAGS='-shared -Wl,-soname=$(SHLIB)' \
73                 SHAREDCMD='$(CC)'; \
74                 $(LINK_SO)
75                 touch $(SHLIB).gnu
76 $(SHLIB).tru64: $(LIB) install/librsaref.a
77                 ALLSYMSFLAGS='-all' \
78                 SHAREDFLAGS='-shared' \
79                 SHAREDCMD='$(CC)'; \
80                 $(LINK_SO)
81                 touch $(SHLIB).tru64
82 $(SHLIB).solaris:       $(LIB) install/librsaref.a
83                 ALLSYMSFLAGS='-z allextract' \
84                 SHAREDFLAGS='-G -h $(SHLIB)' \
85                 SHAREDCMD='$(CC)'; \
86                 $(LINK_SO)
87                 touch $(SHLIB).solaris
88 $(SHLIB).irix:  $(LIB) install/librsaref.a
89                 ALLSYMSFLAGS='-all' \
90                 SHAREDFLAGS='-shared -Wl,-soname,$(SHLIB)' \
91                 SHAREDCMD='$(CC)'; \
92                 $(LINK_SO)
93                 touch $(SHLIB).irix
94 $(SHLIB).hpux32:        $(LIB) install/librsaref.a
95                 ALLSYMSFLAGS='-Fl' \
96                 SHAREDFLAGS='+vnocompatwarnings -b -z +s +h $(SHLIB)' \
97                 SHAREDCMD='/usr/ccs/bin/ld'; \
98                 $(LINK_SO)
99                 touch $(SHLIB).hpux32
100 $(SHLIB).hpux64:        $(LIB) install/librsaref.a
101                 ALLSYMSFLAGS='+forceload' \
102                 SHAREDFLAGS='-b -z +h $(SHLIB)' \
103                 SHAREDCMD='/usr/ccs/bin/ld'; \
104                 $(LINK_SO)
105                 touch $(SHLIB).hpux64
106 $(SHLIB).aix:   $(LIB) install/librsaref.a
107                 ALLSYMSFLAGS='-bnogc' \
108                 SHAREDFLAGS='-G -bE:$(LIBNAME).exp -bM:SRE' \
109                 SHAREDCMD='$(CC)'; \
110                 $(LINK_SO)
111                 touch $(SHLIB).aix
112
113 depend:
114                 sed -e '/^# DO NOT DELETE.*/,$$d' < Makefile > Makefile.tmp
115                 echo '# DO NOT DELETE THIS LINE -- make depend depends on it.' >> Makefile.tmp
116                 gcc -M $(CFLAGS) $(SRC) >> Makefile.tmp
117                 perl ../../../util/clean-depend.pl < Makefile.tmp > Makefile.new
118                 rm -f Makefile.tmp Makefile
119                 mv Makefile.new Makefile
120
121 # DO NOT DELETE THIS LINE -- make depend depends on it.