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