1
#------------------------------------------------------------------------
2
# Imakefile for Xcircuit
3
# (c) 2000 Tim Edwards, Johns Hopkins University
4
#------------------------------------------------------------------------
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
#------------------------------------------------------------------------
12
# If you wish to compile with GNU cc, uncomment the following:
15
# cckr is for SGI only (non-ansi-standard switch):
16
#CCOPTIONS = -O2 -cckr -Wf,-XNh2000 -DHAVE_PUTENV
18
#CCOPTIONS = -Olimit 1000 -taso
20
#CCOPTIONS = -Olimit 1000
22
#CCOPTIONS = -O2 -m486
26
#CCOPTIONS = -Ae -DSVR4
30
# for debugging purposes uncomment the following line:
32
STD_INCLUDES = -I. -I/usr/X11R6/include/X11
34
# The "m4" macro processor is used to generate the man page such that
35
# the man page reflects the configured options.
38
#------------------------------------------------------------------------
39
# Installation directories:
40
# Change the following as desired to suit your environment:
41
#------------------------------------------------------------------------
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
50
#------------------------------------------------------------------------
51
# Support for graphics double-buffering (A memory hog, but yields fastest
52
# graphics rendering).
53
#------------------------------------------------------------------------
55
DO_BUFFER= -DDOUBLEBUFFER
58
#------------------------------------------------------------------------
59
# Support for pixmap icon using xpm
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
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.
73
#------------------------------------------------------------------------
74
# Support for reading various file formats
75
# (other than Xcircuit PostScript)
77
# MAKE_LGF Support for Caltech tools' "analog" simulator .lgf
79
#------------------------------------------------------------------------
83
#------------------------------------------------------------------------
84
# Support for schematic capture
90
#------------------------------------------------------------------------
91
# Support for embedded Python interpreter
92
# (requires libpython${PYTHON_VERSION}.a)
97
PYTHON_LIB_DIR=/usr/lib
98
PYTHON_INCLUDE_DIR=/usr/include/python${PYTHON_VERSION}
100
#------------------------------------------------------------------------
102
# System-specific compile-time definitions
104
#------------------------------------------------------------------------
106
# If the compilation fails due to an error not finding
107
# "u_char" (or "u_short", or "u_long"), uncomment the following
111
HAVE_UCHAR = -DHAVE_U_CHAR
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
120
#------------------------------------------------------------------------
121
# You should not need to change anything after this line
122
#------------------------------------------------------------------------
127
# PostScript source files directory
128
XCIRCUIT_LIBSRC_DIR = ./lib
130
# Standard library files
132
STARTUP_FILE = xcstartup.py
134
STARTUP_FILE = startup.script
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
146
SIGNAL_LIB = signal.lps
147
MUSIC_LIB = musiclib.lps
150
XWLIB = -L./Xw -lxcXw
153
XPM_ICON = -DHAVE_XPM
161
LIBPYTHON= -L${PYTHON_LIB_DIR} -lpython${PYTHON_VERSION} -ldl -lpthread -lutil -ldb
162
INCLUDES= -I${PYTHON_INCLUDE_DIR}
163
P_PYTHON= -DHAVE_PYTHON
171
FOCUS_FIX = -DINPUT_FOCUS
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
199
PACKAGES = ${P_LGF} ${P_SCHEMA} ${P_PYTHON}
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}
215
#define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
218
#ifdef MakeNsubdirMakefiles
219
MakeNsubdirMakefiles()
222
MakeMakeSubdirs(Xw,libxcXw.a)
229
$(CC) -o menudep menudep.o
238
xcircuit: $(OBJS) $(DEPLIBS)
239
RemoveTargetProgram($@)
240
$(CC) -o $@ $(OBJS) $(LDOPTIONS) $(LOCAL_LIBRARIES) $(LDLIBS) \
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)
264
xcircuit.man: xcircuit.1.m4
265
$(M4) $(DEFINES) xcircuit.1.m4 > xcircuit.man
268
InstallManPage(xcircuit,${XCIRCUIT_MAN_DIR})
271
$(RM) xcircuit menudep *.o *.bak xcircuit.1 core
274
$(RM) xcircuit menudep *.o *.bak xcircuit.1 core
275
(cd ./Xw; $(RM) *.o *.bak core)
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)