XCOMM $XConsortium: Imakefile /main/18 1996/05/08 09:29:12 drk $
+#ifdef BSDArchitecture
+UTILLIB = -lutil
+#endif /* BSDArchitecture */
+
#define CplusplusSource YES
DEPEND_DEFINES = $(CXXDEPENDINCLUDES)
+INCLUDES = $(TIRPCINC)
EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB)
-DEPLIBS = $(DEPDTTERMLIB) DepDtClientLibs
-LOCAL_LIBRARIES = $(DTTERMLIB) DtClientLibs
+DEPLIBS = $(DEPDTTERMLIB) DepDtClientLibs $(DEPUTILLIB)
+LOCAL_LIBRARIES = $(DTTERMLIB) DtClientLibs $(UTILLIB)
SYS_LIBRARIES = DtClientSysLibs DtClientExtraLibs
+DTCODEGENCAT = NLSPATH=$(CDESRC)/dtappbuilder/src/abmf/dtcodegen.cat
XCOMM ##########################################################################
ttChooser_stubs.C ttsnoop.C \
ttsnoop_stubs.C
-SRCS.h = $(TARGETS.h.merged) $(TARGETS.h) tt_c++.h DtTt.h
+SRCS2.h = $(TARGETS.h.merged) $(TARGETS.h) tt_c++.h DtTt.h
-SRCS = $(TARGETS.C.merged) $(TARGETS.c) tt_c++.C DtTt.C
+SRCS2 = $(TARGETS.C.merged) $(TARGETS.c) tt_c++.C DtTt.C
-OBJS = \
+OBJS2 = \
DtTt.o apiTracer_stubs.o \
apiTracer_ui.o argChooser_stubs.o \
argChooser_ui.o callbackChooser_stubs.o \
tt_c++.o ttsnoop.o \
ttsnoop_stubs.o ttsnoop_ui.o
+AB_MAKEFILES = \
+ Makefile.aix \
+ Makefile.hpux \
+ Makefile.sunos \
+ Makefile.linux \
+ Makefile.freebsd \
+ Makefile.netbsd \
+ Makefile.openbsd
XCOMM ###
XCOMM ### This is basically a kludge since dtappbuilder is not being
XCOMM ### localincludes:: $(TARGETS.h) $(TARGETS.c)
XCOMM ###
-all:: targets
+all:: targets ttdepend
targets:: $(TARGETS.h) $(TARGETS.c)
NormalCplusplusObjectRule()
-ComplexCplusplusProgramTarget($(PROGRAMS))
+all:: $(PROGRAMS)
+
+ComplexCplusplusProgramTarget_2($(PROGRAMS),$(LOCAL_LIBRARIES),)
+
+ttdepend:: DependFileName
+
+DependFileName::
+ -RunProgram(DEPEND,$(DEPENDFLAGS) $(ALLDEFINES) $(DEPEND_DEFINES) $(SRCS2)) > $@
+
+clean::
+ RemoveFile(ProgramTargetName(PROGRAMS))
XCOMM #####################################################################
# define CodeGenTarget(m) CodeGenAppendableTarget(m)
#endif
+#define SED_MoreButton $(SED) \ @@\
+ -e 's/\(MoreButton;\)/\1Boolean _DtCanHelp( const char * );/' \ @@\
+ -e 's/\(XtManageChild(Quick_help\)/XtSetSensitive(MoreButton,_DtCanHelp(help_data->help_text));\1/' \ @@\
+ -e 's/\(buffer, vol, loc;\)/\1Boolean _DtHelped( Widget );/' \ @@\
+ -e 's/\(if( (cp=strrchr\)/if (_DtHelped( help_dialog)) return;\1/' \ @@\
+ dtb_utils.c > dtb_utils.c.patched
+
+#define SED_DtbTt $(SED) \ @@\
+ -e 's/^DtbTt/extern String snooperArgv[];DtbTt/' \ @@\
+ -e 's/XmNheight, 257,//' \ @@\
+ -e 's/XmNwidth, 580,//' \ @@\
+ -e 's/XmNcolumns, 80,//' \ @@\
+ -e 's/XmNrows, 24/DtNsubprocessArgv, snooperArgv/' \ @@\
+ ttsnoop_ui.c > ttsnoop_ui.c.patched
+
+#define SED_DtbApi $(SED) \ @@\
+ -e 's/^DtbApi/extern String apiTracerArgv[];DtbApi/' \ @@\
+ -e 's/XmNrows, 24/XmNrows, 24, DtNsubprocessArgv, apiTracerArgv/' \ @@\
+ apiTracer_ui.c > apiTracer_ui.c.patched
ttsnoop.C ttsnoop.h dtb_utils.c dtb_utils.h: ttsnoop.bip ttsnoop.C.src
$(CP) ttsnoop.C.src ttsnoop.c
- -if [ ! -w ttsnoop.c ]; then \
- chmod +w ttsnoop.c; fi
+ -if [ ! -w ttsnoop.c ]; then chmod +w ttsnoop.c; fi
$(DTCODEGEN) -changed -merge -p ttsnoop.bip -main
$(RM) ttsnoop.C
$(MV) ttsnoop.c ttsnoop.C
chmod -w ttsnoop.C
cat externC.h dtb_utils.h closeBrace.h > dtb_utils.h.patched
$(MV) dtb_utils.h.patched dtb_utils.h
- sed \
- -e 's/\(MoreButton;\)/\1Boolean _DtCanHelp( const char * );/' \
- -e 's/\(XtManageChild(Quick_help\)/XtSetSensitive(MoreButton,_DtCanHelp(help_data->help_text));\1/' \
- -e 's/\(buffer, vol, loc;\)/\1Boolean _DtHelped( Widget );/' \
- -e 's/\(if( (cp=strrchr\)/if (_DtHelped( help_dialog)) return;\1/' \
- dtb_utils.c > dtb_utils.c.patched
+ SED_MoreButton
$(MV) dtb_utils.c.patched dtb_utils.c
ttsnoop.o: ttsnoop.C ttsnoop.bip $(TARGETS.h) $(TARGETS.h.merged)
CodeGenAppendableTarget(ttsnoop)
- sed -e 's/^DtbTt/extern String snooperArgv[];DtbTt/' \
- -e 's/XmNheight, 257,//' \
- -e 's/XmNwidth, 580,//' \
- -e 's/XmNcolumns, 80,//' \
- -e 's/XmNrows, 24/DtNsubprocessArgv, snooperArgv/' \
- ttsnoop_ui.c > ttsnoop_ui.c.patched
+ SED_DtbTt
$(MV) ttsnoop_ui.c.patched ttsnoop_ui.c
CodeGenAppendableTarget(apiTracer)
- sed -e 's/^DtbApi/extern String apiTracerArgv[];DtbApi/' \
- -e 's/XmNrows, 24/XmNrows, 24, DtNsubprocessArgv, apiTracerArgv/' \
- apiTracer_ui.c > apiTracer_ui.c.patched
+ SED_DtbApi
$(MV) apiTracer_ui.c.patched apiTracer_ui.c
CodeGenTarget(ttChooser)
CodeGenTarget(callbackChooser)
CLEAN_FILES = core .dtcodegen.log *.BAK *.delta *.patched \
- $(PROGRAMS) $(OBJS) $(TARGETS.c) $(TARGETS.h) \
+ $(PROGRAMS) $(OBJS2) $(TARGETS.c) $(TARGETS.h) \
$(TARGETS.c.temp) $(TARGETS.C.merged) Ttsnoop
clean::
- $(RM) $(CLEAN_FILES)
+ $(RM) $(CLEAN_FILES) $(AB_MAKEFILES)
scour:
$(RM) $(CLEAN_FILES) $(TARGETS.h.merged) Makefile Makefile.aix Makefile.hpux Makefile.sunos