~ubuntu-branches/ubuntu/precise/xcircuit/precise

« back to all changes in this revision

Viewing changes to Imakefile

  • Committer: Bazaar Package Importer
  • Author(s): Aanjhan Ranganathan
  • Date: 2006-04-18 23:51:39 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060418235139-s49pkhwdzxvsxm5k
Tags: 3.4.21-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#------------------------------------------------------------------------
2
 
# Imakefile for Xcircuit
3
 
# (c) 2000 Tim Edwards, Johns Hopkins University
4
 
#------------------------------------------------------------------------
5
 
#
6
 
#------------------------------------------------------------------------
7
 
# Compile flags (should not be necessary to uncomment anything unless
8
 
# you have a DEC Alpha or if problems are encountered during compilation):
9
 
#------------------------------------------------------------------------
10
 
#
11
 
#CC = cc
12
 
# If you wish to compile with GNU cc, uncomment the following:
13
 
#CC = gcc
14
 
#
15
 
# cckr is for SGI only (non-ansi-standard switch):
16
 
#CCOPTIONS = -O2 -cckr -Wf,-XNh2000 -DHAVE_PUTENV
17
 
# for DEC Alpha:
18
 
#CCOPTIONS = -Olimit 1000 -taso
19
 
# for DEC ULTRIX:
20
 
#CCOPTIONS = -Olimit 1000
21
 
# for Linux:
22
 
#CCOPTIONS = -O2 -m486
23
 
# for Solaris:
24
 
#CCOPTIONS =
25
 
# for HP/UX:
26
 
#CCOPTIONS = -Ae -DSVR4
27
 
# otherwise try:
28
 
#CCOPTIONS = -O2
29
 
#
30
 
# for debugging purposes uncomment the following line:
31
 
CDEBUGFLAGS = -g
32
 
STD_INCLUDES = -I. -I/usr/X11R6/include/X11
33
 
 
34
 
# The "m4" macro processor is used to generate the man page such that
35
 
# the man page reflects the configured options.
36
 
M4 = m4
37
 
 
38
 
#------------------------------------------------------------------------
39
 
# Installation directories:
40
 
# Change the following as desired to suit your environment:
41
 
#------------------------------------------------------------------------
42
 
#
43
 
PREFIX = /usr
44
 
# XCIRCUIT_LIB_DIR = $(PREFIX)/src/xcircuit-2.5.2/lib
45
 
XCIRCUIT_LIB_DIR = $(PREFIX)/share/xcircuit
46
 
XCIRCUIT_BIN_DIR = $(PREFIX)/bin
47
 
XCIRCUIT_MAN_DIR = $(PREFIX)/man/man1
48
 
XAPPLRESDIR = ${XCIRCUIT_LIB_DIR}/app-defaults
49
 
 
50
 
#------------------------------------------------------------------------
51
 
# Support for graphics double-buffering (A memory hog, but yields fastest
52
 
# graphics rendering).
53
 
#------------------------------------------------------------------------
54
 
#
55
 
DO_BUFFER= -DDOUBLEBUFFER
56
 
# DO_BUFFER=
57
 
 
58
 
#------------------------------------------------------------------------
59
 
# Support for pixmap icon using xpm
60
 
#define HAVE_XPM
61
 
 
62
 
#------------------------------------------------------------------------
63
 
# Support for background rendering through ghostscript.  Change this
64
 
# to the path where gs can be found.
65
 
# GS_EXEC= /usr/local/src/gs5.50/obj/gs
66
 
GS_EXEC= /usr/bin/gs
67
 
 
68
 
#------------------------------------------------------------------------
69
 
# Window manager bug workaround---If you don't like xcircuit grabbing kbd
70
 
# focus whenever the pointer crosses the window, delete this definition.
71
 
#define INPUT_FOCUS
72
 
 
73
 
#------------------------------------------------------------------------
74
 
# Support for reading various file formats
75
 
# (other than Xcircuit PostScript)
76
 
#
77
 
#   MAKE_LGF    Support for Caltech tools' "analog" simulator .lgf
78
 
#               file format.    
79
 
#------------------------------------------------------------------------
80
 
#
81
 
#define MAKE_LGF
82
 
 
83
 
#------------------------------------------------------------------------
84
 
# Support for schematic capture
85
 
#
86
 
#define SCHEMA
87
 
 
88
 
SCHEMFLAG = -schem
89
 
 
90
 
#------------------------------------------------------------------------
91
 
# Support for embedded Python interpreter
92
 
# (requires libpython${PYTHON_VERSION}.a)
93
 
#
94
 
#define HAVE_PYTHON
95
 
 
96
 
PYTHON_VERSION=2.1
97
 
PYTHON_LIB_DIR=/usr/lib
98
 
PYTHON_INCLUDE_DIR=/usr/include/python${PYTHON_VERSION}
99
 
 
100
 
#------------------------------------------------------------------------
101
 
#
102
 
# System-specific compile-time definitions
103
 
#
104
 
#------------------------------------------------------------------------
105
 
 
106
 
# If the compilation fails due to an error not finding
107
 
# "u_char" (or "u_short", or "u_long"), uncomment the following
108
 
# definition:
109
 
#HAVE_UCHAR =
110
 
# Otherwise,
111
 
HAVE_UCHAR = -DHAVE_U_CHAR
112
 
 
113
 
# My DECstation (Ultrix) has something funny going on in XLib. . . if there
114
 
# is a compile-time error "ld: Undefined: XUniqueContext *** Error code 1"
115
 
# then enable the following definition:
116
 
#CONTEXT_FIX = -DUniqueContextProblem
117
 
# Otherwise,
118
 
CONTEXT_FIX =
119
 
 
120
 
#------------------------------------------------------------------------
121
 
# You should not need to change anything after this line
122
 
#------------------------------------------------------------------------
123
 
 
124
 
# Version number
125
 
VERSION = 3.0
126
 
 
127
 
# PostScript source files directory
128
 
XCIRCUIT_LIBSRC_DIR = ./lib
129
 
 
130
 
# Standard library files
131
 
#ifdef HAVE_PYTHON
132
 
STARTUP_FILE = xcstartup.py
133
 
#else
134
 
STARTUP_FILE = startup.script
135
 
#endif
136
 
USER_RC_FILE  = .xcircuitrc
137
 
PROLOGUE_FILE = xcircps2.pro
138
 
BUILTINS_DEP1 = generic.lps
139
 
BUILTINS_DEP2 = analog.lps
140
 
BUILTINS_DEP3 = avlsi.lps
141
 
BUILTINS_DEP4 = digital.lps
142
 
BUILTINS_DEP5 = analoglib2.lps
143
 
BUILTINS_DEP6 = ic_templates.lps
144
 
BUILTINS_DEP7 = quadparts.lps
145
 
LGF_LIB       = lgf.lps
146
 
SIGNAL_LIB    = signal.lps
147
 
MUSIC_LIB     = musiclib.lps
148
 
 
149
 
# Xw library
150
 
XWLIB = -L./Xw -lxcXw
151
 
 
152
 
#ifdef HAVE_XPM
153
 
XPM_ICON = -DHAVE_XPM
154
 
XPMLIB = -lXpm
155
 
#else
156
 
XPM_ICON =
157
 
XPMLIB =
158
 
#endif
159
 
 
160
 
#ifdef HAVE_PYTHON
161
 
LIBPYTHON= -L${PYTHON_LIB_DIR} -lpython${PYTHON_VERSION} -ldl -lpthread -lutil -ldb
162
 
INCLUDES= -I${PYTHON_INCLUDE_DIR}
163
 
P_PYTHON= -DHAVE_PYTHON
164
 
#else
165
 
LIBPYTHON=
166
 
INCPYTHON=
167
 
P_PYTHON=
168
 
#endif
169
 
 
170
 
#ifdef INPUT_FOCUS
171
 
FOCUS_FIX = -DINPUT_FOCUS
172
 
#else
173
 
FOCUS_FIX =
174
 
#endif
175
 
 
176
 
DEPLIBS = $(DEPXLIB)
177
 
LOCAL_LIBRARIES = $(XWLIB) $(XPMLIB) $(XTOOLLIB) $(XLIB) $(LIBPYTHON) -lm
178
 
SRCS = files.c text.c events.c selection.c elements.c libraries.c \
179
 
        functions.c formats.c help.c rcfile.c schema.c netlist.c \
180
 
        filelist.c menucalls.c fontfile.c parameter.c render.c \
181
 
        keybindings.c python.c xcircuit.c
182
 
OBJS = files.o text.o events.o selection.o elements.o libraries.o \
183
 
        functions.o formats.o help.o rcfile.o schema.o netlist.o \
184
 
        filelist.o menucalls.o fontfile.o parameter.o render.o \
185
 
        keybindings.o python.o xcircuit.o
186
 
 
187
 
#ifdef MAKE_LGF
188
 
P_LGF = -DLGF
189
 
#else
190
 
P_LGF =
191
 
#endif
192
 
 
193
 
#ifdef SCHEMA
194
 
P_SCHEMA = -DSCHEMA
195
 
#else
196
 
P_SCHEMA =
197
 
#endif
198
 
 
199
 
PACKAGES = ${P_LGF} ${P_SCHEMA} ${P_PYTHON}
200
 
 
201
 
DEFINES = -DBUILTINS_DIR=\"${XCIRCUIT_LIB_DIR}\" \
202
 
        -DSTARTUP_FILE=\"${STARTUP_FILE}\" \
203
 
        -DUSER_RC_FILE=\"${USER_RC_FILE}\" \
204
 
        -DPROLOGUE_DIR=\"${XCIRCUIT_LIB_DIR}\" \
205
 
        -DPROLOGUE_FILE=\"${PROLOGUE_FILE}\" \
206
 
        -DLGF_LIB=\"${LGF_LIB}\" \
207
 
        -DSCHEM_PROG=\"${SCHEMPROG}\" \
208
 
        -DSCHEM_FLAG=\"${SCHEMFLAG}\" \
209
 
        -DGS_EXEC=\"${GS_EXEC}\" \
210
 
        -DPROG_VERSION=${VERSION} \
211
 
        -DXAPPLRESDIR=\"${XAPPLRESDIR}\" \
212
 
        ${CONTEXT_FIX} ${PACKAGES} ${DO_BUFFER} \
213
 
        ${HAVE_UCHAR} ${XPM_ICON} ${FOCUS_FIX}
214
 
 
215
 
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
216
 
   AllTarget(libxcXw.a)
217
 
 
218
 
#ifdef MakeNsubdirMakefiles
219
 
   MakeNsubdirMakefiles()
220
 
#endif
221
 
 
222
 
MakeMakeSubdirs(Xw,libxcXw.a)
223
 
MakeSubdirs(Xw)
224
 
DependSubdirs(Xw)
225
 
 
226
 
AllTarget(menudep)
227
 
 
228
 
menudep: menudep.o
229
 
        $(CC) -o menudep menudep.o
230
 
 
231
 
AllTarget(xcircuit)
232
 
 
233
 
help.c: menudep.h
234
 
 
235
 
menudep.h: menudep
236
 
        ./menudep
237
 
 
238
 
xcircuit: $(OBJS) $(DEPLIBS)
239
 
        RemoveTargetProgram($@)
240
 
        $(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) \
241
 
                $(EXTRA_LOAD_FLAGS)
242
 
DependTarget()
243
 
 
244
 
install::
245
 
InstallProgram(xcircuit,${XCIRCUIT_BIN_DIR})
246
 
        MakeDir($(DESTDIR)${XCIRCUIT_LIB_DIR})
247
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${STARTUP_FILE},${XCIRCUIT_LIB_DIR})
248
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${PROLOGUE_FILE},${XCIRCUIT_LIB_DIR})
249
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP1},${XCIRCUIT_LIB_DIR})
250
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP2},${XCIRCUIT_LIB_DIR})
251
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP3},${XCIRCUIT_LIB_DIR})
252
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP4},${XCIRCUIT_LIB_DIR})
253
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP5},${XCIRCUIT_LIB_DIR})
254
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP6},${XCIRCUIT_LIB_DIR})
255
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${BUILTINS_DEP7},${XCIRCUIT_LIB_DIR})
256
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${LGF_LIB},${XCIRCUIT_LIB_DIR})
257
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${SIGNAL_LIB},${XCIRCUIT_LIB_DIR})
258
 
InstallNonExec(${XCIRCUIT_LIBSRC_DIR}/${MUSIC_LIB},${XCIRCUIT_LIB_DIR})
259
 
        MakeDir($(DESTDIR)${XCIRCUIT_LIB_DIR}/fonts)
260
 
        (cd ${XCIRCUIT_LIBSRC_DIR}/fonts; cp *.lps $(DESTDIR)${XCIRCUIT_LIB_DIR}/fonts) 
261
 
        (cd ${XCIRCUIT_LIBSRC_DIR}/fonts; cp *.xfe $(DESTDIR)${XCIRCUIT_LIB_DIR}/fonts) 
262
 
# InstallAppDefaults(XCircuit)
263
 
 
264
 
xcircuit.man: xcircuit.1.m4
265
 
        $(M4) $(DEFINES) xcircuit.1.m4 > xcircuit.man
266
 
 
267
 
install.man::
268
 
InstallManPage(xcircuit,${XCIRCUIT_MAN_DIR})
269
 
 
270
 
topclean::
271
 
        $(RM) xcircuit menudep *.o *.bak xcircuit.1 core
272
 
 
273
 
clean::
274
 
        $(RM) xcircuit menudep *.o *.bak xcircuit.1 core
275
 
        (cd ./Xw; $(RM) *.o *.bak core)
276
 
 
277
 
veryclean::
278
 
        $(RM) xcircuit *.o *.bak Makefile menudep menudep.h xcircuit.1 core
279
 
        $(RM) config.cache config.log config.status
280
 
        (cd ./Xw; $(RM) *.o *.a *.bak Makefile core)