1/* $Id: Imakefile,v 1.8.2.4 2004/05/19 15:39:22 aida_s Exp $ */ 2#include "../Canna.conf" 3#ifdef TermcapLibrary 4TERMCAP_LIB = TermcapLibrary 5#else 6# if SystemV || SystemV4 7TERMCAP_LIB = -lcurses 8# else 9TERMCAP_LIB = -ltermcap 10# endif 11#endif 12#ifndef CanuumConfigureArgs 13# define CanuumConfigureArgs --with-term-libs="$(TERMCAP_LIB)" 14#endif 15 16 CANNAROOT = .. 17INSTUGIDFLAGS = 18 CANNASRC = $(CANNAROOT)/lib/canna16 19 DEFINES = -DCANNA -DJAPANESE $(SIGNAL_DEFINES) -DHAVE_CONFIG_H \ 20 -DCONFIG_TERMINFO -DUSE_LIBSPT 21 INCLUDES = -I$(CANNAROOT)/include -I. `libspt-config --cflags` 22SYS_LIBRARIES = $(TERMCAP_LIB) `libspt-config --libs` 23 24 SRCS = header.c printf.c termio.c termcap.c \ 25 screen.c cursor.c jhlp.c xutoj.c canna.c 26 OBJS = header.o printf.o termio.o termcap.o \ 27 screen.o cursor.o jhlp.o xutoj.o canna.o 28 29 TARGET = canuum 30XCOMM --prefix is not used but add just in case 31CONFIGURE_CMD = IN_MAKE=yes $(CANNAROOT)/confwrapper run ./configure --prefix=$(cannaPrefix) CanuumConfigureArgs 32PURE_CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) /* $(THREADS_CFLAGS) $(MODULE_CFLAGS) */ 33 34AllTarget(ProgramTargetName($(TARGET))) 35NormalProgramTarget($(TARGET),$(OBJS),$(DEPCANNALIB16),$(CANNALIB16),) 36InstallMultipleFlags($(TARGET),$(cannaBinDir),$(INSTUGIDFLAGS)) 37InstallManPage($(TARGET),$(cannaManDir)) 38DependTarget() 39LintTarget() 40distclean:: 41 $(RM) config.h config.cache config.status cwenv.sh 42includes:: config.h 43XCOMM Invoke configure only when config.h does not exist for faster build 44config.h: 45 $(CONFIGURE_CMD) 46XCOMM If you want to invoke configure explicitly, do "make config" 47config:: 48 $(CONFIGURE_CMD) 49reconfig:: 50 $(RM) config.cache cwenv.sh 51 $(CONFIGURE_CMD) 52XCOMM Invoked from confwrapper 53cwenv.sh: 54 $(CANNAROOT)/confwrapper mkenv CPPFLAGS $(ALLDEFINES) > $@ 55 $(CANNAROOT)/confwrapper mkenv CC env $(CC) >> $@ 56 $(CANNAROOT)/confwrapper mkenv CFLAGS $(PURE_CFLAGS) >> $@ 57