Link with C++ linker
[oweals/cde.git] / cde / programs / dtksh / Imakefile
1 XCOMM $TOG: Imakefile /main/15 1998/04/07 08:55:29 mgreess $
2 DESKTOP_VERSION_STRING = DesktopVersionString
3
4 KSH93SRC = ./ksh93
5 INCLUDES = -I. -I$(KSH93SRC)/include/ast -I$(KSH93SRC)/src/cmd/ksh93/include -I$(KSH93SRC)/src/cmd/ksh93
6
7 /* DEPLIBS contains the list of library depencies for a client.
8  * LOCAL_LIBRARIES contains the list of libraries on the link line.
9  * Generally, the dependency form of a library has DEP as a prefix.
10  * e.g. put $(XLIB) in LOCAL_LIBRARIES and $(DEPXLIB) in DEPLIBS.
11  * NOTE: if DEPLIBS is not set here, it is by default null and there
12  *       are no library dependencies for clients.
13  *       You cannot put -Llibpath into DEPLIBS. You must put actual
14  *       paths to the library.
15  */
16 DEPLIBS = $(DEPDTHELPLIB) $(DEPDTSVCLIB) $(DEPDTWIDGETLIB) $(DEPDTPRINTLIB) \
17           $(DEPXPLIB) $(DEPTTLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB) \
18           $(KSH93SRC)/lib/libast.a
19 LOCAL_LIBRARIES = $(DTHELPLIB) $(DTWIDGETLIB) $(DTSVCLIB) $(DTPRINTLIB) \
20                   $(XPLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \
21                   $(KSH93SRC)/lib/libcmd.a  $(KSH93SRC)/lib/libast.a 
22
23 SYS_LIBRARIES = -lm $(DYNLIBSYSLIB) $(REGEXSYSLIB) $(ICONVSYSLIB)
24
25 #ifdef HPArchitecture
26 EXTRA_DEFINES = -Wl,-E -DHPUX_DYNLIB -Wp,-H12000
27 SYS_LIBRARIES = -lm -ldld 
28 #endif
29
30 #ifdef RsArchitecture
31 EXTRA_DEFINES = -DDYNLIB -D_IBMRPC_
32 LOCAL_LDFLAGS = -bE:dtksh.exp
33 #endif
34
35 #if defined (SunArchitecture)
36 EXTRA_DEFINES = -DDYNLIB
37 #endif
38
39 #if defined (USLArchitecture)
40 EXTRA_DEFINES = -DDYNLIB
41 LOCAL_LDFLAGS = -Wl,-Bexport:dtksh.exp
42 #endif
43
44 #if defined (UXPArchitecture)
45 EXTRA_DEFINES = -DDYNLIB
46 LOCAL_LDFLAGS = -Wl,-Bexport:dtksh.exp
47 #endif
48
49 #if defined(HPOSFArchitecture)
50 #endif
51
52
53 #if defined(ApolloArchitecture)
54 EXTRA_INCLUDES = -I/bsd4.3/usr/include -I/sys5/usr/include \
55         -I$(DTHELPSRC) -I$(DTPRINTSRC)
56 #else
57 EXTRA_INCLUDES = -I$(DTHELPSRC) -I$(DTPRINTSRC)
58 #endif
59
60 #ifdef SunArchitecture
61 .NO_PARALLEL:
62 #endif
63
64 #define IHaveSubdirs
65 #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
66
67 #if defined(LinuxArchitecture)
68 SUBDIRS = examples
69 KSH93OBJ =
70 #else
71 SUBDIRS = examples ksh93
72 KSH93OBJ = $(KSH93SRC)/ksh93.o
73 #endif
74
75 MakeSubdirs($(SUBDIRS))
76
77 KSH93LIBSHELL = $(KSH93SRC)/src/cmd/ksh93/libshell.a
78
79 PROGRAMS = dtksh
80
81 SRCS =  \
82                 userinit.c \
83                 builtins.c \
84                 aliases.c \
85                 widget.c \
86                 dtkcvt.c \
87                 dtkcmds.c \
88                 XtCvtrs.c \
89                 xmcvt.c \
90                 xmcmds.c \
91                 xmwidgets.c \
92                 extra.c \
93                 xmdtksym.c \
94                 findsym.c \
95                 msgs.c \
96                 version.c
97
98 OBJS =  \
99                 $(KSH93OBJ) \
100                 libshell.a \
101                 widget.o \
102                 dtkcvt.o \
103                 dtkcmds.o \
104                 XtCvtrs.o \
105                 xmcvt.o \
106                 xmcmds.o \
107                 xmwidgets.o \
108                 extra.o \
109                 xmdtksym.o \
110                 findsym.o \
111                 msgs.o \
112                 version.o \
113                 $(LOCAL_LIBRARIES2)
114
115 all:: dtksh
116
117 $(KSH93SRC)/ksh93.o:
118         cd $(KSH93SRC); $(MAKE)
119
120 XCOMM
121 XCOMM Must replace standard ksh tables of builtins and aliases
122 XCOMM with our augmented versions.
123 XCOMM
124
125 libshell.a: $(KSH93SLIBSHELL) userinit.o builtins.o aliases.o
126         $(CP) $(KSH93LIBSHELL) libshell.a; \
127         ar d libshell.a userinit.o builtins.o aliases.o ; \
128         $(AR) libshell.a userinit.o builtins.o aliases.o
129
130 SpecialObjectRule(userinit.o,$(NULL),-DSHOPT_VSH -DKSHELL -D_TRACE_ )
131 SpecialObjectRule(builtins.o,$(NULL),-DSHOPT_VSH -DKSHELL -D_TRACE_ )
132 SpecialObjectRule(aliases.o,$(NULL),-DSHOPT_VSH -DKSHELL -D_TRACE_ )
133
134 ComplexProgramTarget($(PROGRAMS))
135
136 clean::
137         @echo " Cleaning ksh directories"
138         ./MakeClean