/[ascend]/trunk/base/generic/lib/Makefile.in
ViewVC logotype

Contents of /trunk/base/generic/lib/Makefile.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 26 - (show annotations) (download)
Thu Dec 9 16:25:02 2004 UTC (20 years ago) by aw0a
File size: 4813 byte(s)
adding lib directory less Makefile
1 # ASCEND lib Directory Makefile
2 # Makefile for building dynamically loaded binary relations and other misc
3 # things where we assume there is no source tree available and no
4 # Makefile.Rules or ConfigAscend.
5 # Mark Thomas
6 # March 18, 1997
7 # $Date: 1998/06/18 18:45:42 $
8 # $Revision: 1.10 $
9 # $Author: mthomas $
10 # $Source: /afs/cs.cmu.edu/project/ascend/Repository/ascend4/lib/Makefile.in,v $
11 #
12
13
14 SHELL = /bin/sh
15 builddir = ../../../base/generic
16 srcdir = @srcdir@
17 VPATH = @srcdir@
18
19
20
21 # The next variables are the primary executables and/or libraries that
22 # this makefile is responsible for, and the default target of this
23 # makefile.
24
25 EXECUTABLE =
26
27 LIBRARY = none
28
29
30 default: btprolog.h Makefile.bt
31
32
33
34 # Defines and Includes that are specific to this directory
35
36 DIR_SPECIFIC_DEFS =
37 DIR_SPECIFIC_INCS =
38
39
40
41 # The next variables list the source files (EXEC_SCRS) to compile
42 # into the object files (EXEC_OBJS) that are linked with the
43 # library files (EXEC_LIBS) to make EXECUTABLE
44
45 EXEC_SRCS =
46
47 EXEC_OBJS =
48
49 EXEC_LIBS =
50
51
52
53 # The next variables list the source files (LIB_SCRS) to compile
54 # into the object files (LIB_OBJS) that are combined to make LIBRARY
55
56 LIB_SRCS =
57
58 LIB_OBJS =
59
60
61
62 # The global makefile macros (ConfigAscend) and global rules (Makefile.Rules)
63 #
64 include $(builddir)/ConfigAscend
65 include $(builddir)/Makefile.Rules
66
67
68
69 # File specific rules
70
71 # Copy the bintoken header file from the compiler directory
72
73 btprolog.h: $(srcdir)/../compiler/btprolog.h
74 $(CP) $(srcdir)/../compiler/btprolog.h .
75
76
77 # Build a Makfile suitable for installing
78
79 Makefile.bt: Makefile ../ConfigAscend
80 $(RM) $@
81 @$(ECHO) '# Makefile for ASCEND bin-tokens' >$@
82 @$(ECHO) '#' >>$@
83 @$(ECHO) '# This makefile is generated by ASCENDs make install' >>$@
84 @$(ECHO) '# It is used by the ASCEND compiler to build a shared' >>$@
85 @$(ECHO) '# object that is loaded into ASCEND' >>$@
86 @$(ECHO) '' >>$@
87 @$(ECHO) '# default C compiler.' >>$@
88 @$(ECHO) 'CC = $(CC)' >>$@
89 @$(ECHO) '' >>$@
90 @$(ECHO) '# unix, at least' >>$@
91 @$(ECHO) 'CP = $(CP)' >>$@
92 @$(ECHO) '' >>$@
93 @$(ECHO) '# caller is assumed to pass to make on the command line' >>$@
94 @$(ECHO) '#-RM=/bin/rm (or some equivalent file deletion command)' >>$@
95 @$(ECHO) '#-BTINCLUDES=(the absolute path of this directory)' >>$@
96 @$(ECHO) '' >>$@
97 @$(ECHO) '# Flags to pass to the C compiler when compiling' >>$@
98 @$(ECHO) '# the components of a shared library' >>$@
99 @$(ECHO) 'SHLIB_CFLAGS = $(SHLIB_CFLAGS)' >>$@
100 @$(ECHO) '' >>$@
101 @$(ECHO) '# Base command to use to combine object files into' >>$@
102 @$(ECHO) '# a shared library' >>$@
103 @$(ECHO) 'SHLIB_LD = $(SHLIB_LD)' >>$@
104 @$(ECHO) '' >>$@
105 @$(ECHO) '# Dependent libraries for the linker to scan when' >>$@
106 @$(ECHO) '# creating a shared library' >>$@
107 @$(ECHO) 'SHLIB_LD_LIBS = $(SHLIB_LD_LIBS)' >>$@
108 @$(ECHO) '' >>$@
109 @$(ECHO) '# Suffix to use for the names of dynamically' >>$@
110 @$(ECHO) '# loadable objects' >>$@
111 @$(ECHO) 'SHLIB_SUFFIX = $(SHLIB_SUFFIX)' >>$@
112 @$(ECHO) '' >>$@
113 $(SED) -ne '/^###START_COPY_ME/,/^###END_COPY_ME/p' Makefile >>$@
114
115
116 # The following is the target to make the dynamically loadable object
117 # and the required flags. When we ``make install'' everything
118 # between the START_COPY_ME and END_COPY_ME lines will be put into
119 # the generated Makefile
120
121 # Do not edit the next line --- it is special
122 ###START_COPY_ME
123
124 # Flags for building routine and simple generated C code.
125 # Generally, -O > -O2 is a bad idea because it messes with
126 # IEEE 754 standards and we may not get the expected trap
127 # behavior.
128 BTCFLAGS = -O -c
129
130 $(BTTARGET) _dummy_target: $(BTTARGET).c
131 -$(RM) $(BTTARGET).o $(BTTARGET)$(SHLIB_SUFFIX)
132 $(CC) $(BTINCLUDES) $(SHLIB_CFLAGS) $(BTCFLAGS) \
133 $(BTTARGET).c -o $(BTTARGET).o
134 $(SHLIB_LD) $(SHLIB_LDFLAGS) \
135 -o $(BTTARGET)$(SHLIB_SUFFIX) $(BTTARGET).o
136
137 ###END_COPY_ME
138 # Do not edit the previous line --- it is special
139
140
141
142 # Files to install
143
144 install-binaries:: btprolog.h Makefile.bt
145 @if test ! -d $(LIB_DIR) ; then \
146 echo Making directory $(LIB_DIR) ; \
147 mkdir -p $(LIB_DIR) ; \
148 fi
149 @for i in btprolog.h Makefile.bt /dev/null ; do \
150 if $(CMP) -s $$i $(LIB_DIR)/$$i ; then \
151 echo "Skipping $$i (up to date)" ; \
152 elif test $$i != "/dev/null" ; then \
153 echo "Installing $$i --> $(LIB_DIR)" ; \
154 $(INSTALL_DATA) $$i $(LIB_DIR) ; \
155 fi ; \
156 done
157
158 uninstall-binaries::
159 @for i in btprolog.h Makefile.bt /dev/null ; do \
160 if test -f $(LIB_DIR)/$$i ; then \
161 echo Removing $(LIB_DIR)/$$i ; \
162 $(RM) $(LIB_DIR)/$$i ; \
163 fi ; \
164 done
165
166
167
168 # Files, in addition to the default, to remove when we `make clean'
169
170 clean::
171 -$(RM) btprolog.h Makefile.bt *.so *.sl
172
173
174
175 # DO NOT DELETE THIS LINE -- g++dep uses it.
176 # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
177
178
179 # IF YOU PUT ANYTHING HERE IT WILL GO AWAY

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22