Annotation of OpenXM_contrib2/asir2000/Imakefile, Revision 1.4
1.4 ! noro 1: /* $OpenXM: OpenXM_contrib2/asir2000/Imakefile,v 1.3 2000/01/26 02:18:02 noro Exp $ */
1.1 noro 2: #define RISA_TOP_DIR
3: #include "include/Risa.tmpl"
4:
5: #define IHaveSubdirs
6: #define PassCDebugFlags
7:
8: #ifdef FreeBSDArchitecture
9: EXTRALIB=-lcompat
10: #endif
11:
12: #ifdef SunArchitecture
13: EXTRASTDLIB= $(MPILIB) -ldl
14: #endif
15:
16: #if defined(AlphaArchitecture) && OSMajorVersion < 4
17: EXTRASTDLIB=/usr/lib/libots.a
18: #endif
19:
20: #if defined(LinuxArchitecture) && DefaultLinuxCLibMajorVersion < 6
21: LIBCLIB=/usr/lib/libc.a -lm
22: #else
23: LIBCLIB=-lm
24: #endif
25:
26: LOCAL_LIBRARIES = -L/usr/openwin/lib XawClientLibs $(XWCHARLIB)
27: DEPLIBS = XawClientDepLibs
28:
29: PLIB = parse/libparse.a
1.4 ! noro 30: GLIB = gc/libasir-gc.a
1.1 noro 31: ELIB = engine/libca.a
32: E27LIB=engine-27/libca-27.a
33: FLIB=fft/libdft.a
34: ALIB = asm/libasm.a
35: IOLIB = io/libio.a
36: BLIB = builtin/libfunc.a
37:
38: #ifdef USE_PLOT
39: PLLIB = plot/libplot.a
40: #else
41: PLLIB =
42: #endif
43:
44: PROGRAMS = asir
1.4 ! noro 45: LIBRARIES = libasir.a $(GLIB)
1.1 noro 46:
47: TOBJ = parse/main.o $(FOBJ)
48: UOBJ = parse/umain.o $(FOBJ)
49:
50: SUBDIRS = engine engine-27 fft asm gc parse builtin io plot lib
51:
1.4 ! noro 52: LIBS0 = $(BLIB) $(PLIB) $(IOLIB) $(PLLIB) $(ELIB) $(E27LIB) $(FLIB) $(ALIB)
! 53: LIBS = $(LIBS0) $(GLIB)
1.1 noro 54: PILIBS = $(IOLIB) $(GLIB) $(ELIB) $(E27LIB) $(FLIB) $(ALIB)
55:
1.4 ! noro 56:
1.1 noro 57: MakeSubdirs($(SUBDIRS))
58: DependSubdirs($(SUBDIRS))
59:
60: #if 0
61: AllTarget($(PROGRAMS) asir.o)
62: #else
1.4 ! noro 63: AllTarget($(PROGRAMS) $(LIBRARIES))
1.1 noro 64: #endif
65:
66: #ifndef NormalRelocTarget
67: #define NormalRelocTarget(program,objects,deplibs,locallibs,syslibs) @@\
68: program: objects deplibs @@\
69: RemoveTargetProgram($@) @@\
70: ld -r objects locallibs $(LDLIBS) syslibs $(EXTRA_LOAD_FLAGS) -o $@ @@\
71: @@\
72: clean:: @@\
73: $(RM) program
74: #endif /* NormalRelocTarget */
75:
76: NormalProgramTarget(asir,$(TOBJ),$(LIBS),$(LIBS),$(PARILIB) $(RLLIB) $(LOCAL_LIBRARIES) $(EXTRALIB) $(KANLIB) $(GMPLIB) $(LAPACKLIB) $(LIBCLIB) $(EXTRASTDLIB) )
77: NormalRelocTarget(asir.o,$(UOBJ),$(LIBS),$(LIBS),$(PARILIB) $(RLLIB) $(EXTRALIB) $(LIBCLIB) $(EXTRASTDLIB))
78:
1.4 ! noro 79: libasir.a: $(LIBS0)
! 80: -mkdir libtmp
! 81: ( cd libtmp; $(RM) * )
! 82: for i in $(LIBS); do ( cd libtmp; ar x ../$$i; chmod 644 * ) done
! 83: $(RM) $@
! 84: ( cd libtmp; $(AR) ../$@ *.o )
! 85: $(RANLIB) $@
! 86: $(_NULLCMD_)
! 87:
! 88: install:: $(PROGRAMS) $(LIBRARIES)
1.1 noro 89: MakeDir($(ASIR_LIBDIR))
1.4 ! noro 90: $(INSTALL) $(INSTALLFLAGS) $(PROGRAMS) $(ASIR_LIBDIR)
! 91: MakeDir($(ROOTDIR)/lib)
! 92: $(INSTALL) $(INSTALLFLAGS) $(LIBRARIES) $(ROOTDIR)/lib
! 93: for i in $(LIBRARIES); do $(RANLIB) $(ROOTDIR)/lib/`basename $$i` ; done
1.1 noro 94:
1.2 noro 95: install-lib::
96: (cd lib; make install-lib)
1.1 noro 97: $(RM) $(ASIR_LIBDIR)/ox_asir
98: $(LN) $(ASIR_LIBDIR)/asir $(ASIR_LIBDIR)/ox_asir
99: $(RM) $(ASIR_LIBDIR)/ox_launch
100: $(LN) $(ASIR_LIBDIR)/asir $(ASIR_LIBDIR)/ox_launch
101: $(RM) $(ASIR_LIBDIR)/ox_plot
102: $(LN) $(ASIR_LIBDIR)/asir $(ASIR_LIBDIR)/ox_plot
103: $(RM) $(ASIR_BINDIR)/asir
104: $(LN) $(ASIR_LIBDIR)/asir $(ASIR_BINDIR)/asir
1.3 noro 105:
106: install-doc::
107: (cd lib; make install-doc)
1.4 ! noro 108:
! 109: clean::
! 110: $(RM) -r libtmp $(LIBRARIES)
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>