# $Id$ # Makefile for tack # # The variable 'srcdir' refers to the source-distribution, and can be set with # the configure script by "--srcdir=DIR". # # The rules are organized to produce the libraries for the configured models, # and the programs with the configured default model. # turn off _all_ suffix rules; we'll generate our own .SUFFIXES: SHELL = /bin/sh THIS = Makefile CF_MFLAGS = x = o = .o MODEL = ../objects DESTDIR = srcdir = . prefix = /usr exec_prefix = ${prefix} bindir = ${exec_prefix}/bin libdir = ${exec_prefix}/lib mandir = /dev/null includedir = ${prefix}/include datadir = ${prefix}/share LIBTOOL = LIBTOOL_CLEAN = LIBTOOL_COMPILE = LIBTOOL_LINK = LIBTOOL_INSTALL = LIBTOOL_UNINSTALL = INSTALL = /usr/bin/install -c INSTALL_PROGRAM = ${INSTALL} INSTALL_DATA = ${INSTALL} -m 644 AWK = mawk LN_S = ln -s CC = arm-elf-gcc CPP = arm-elf-gcc -E CFLAGS = -Wall -pipe -W -mtune=arm9tdmi -mcpu=arm9tdmi -malignment-traps -mapcs-32 -ansi -Wstrict-prototypes -Wno-trigraphs -Os -fno-strict-aliasing -DNO_MM -I$(ROOTDIR)/uClibc/include INCDIR = $(srcdir)/../include CPPFLAGS = -DHAVE_CONFIG_H -I../tack -I$(srcdir) -I. -I../include -I$(ROOTDIR)/uClibc/include -U_XOPEN_SOURCE -D_XOPEN_SOURCE=500 -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=199506L -DNDEBUG CCFLAGS = $(CPPFLAGS) $(CFLAGS) CFLAGS_LIBTOOL = $(CCFLAGS) CFLAGS_NORMAL = $(CCFLAGS) CFLAGS_DEBUG = $(CCFLAGS) -g -DTRACE CFLAGS_PROFILE = $(CCFLAGS) -pg CFLAGS_SHARED = $(CCFLAGS) unknown CFLAGS_DEFAULT = $(CFLAGS_NORMAL) LD = arm-elf-ld LINK = $(LIBTOOL_LINK) $(CC) LDFLAGS = \ -L../lib -nostartfiles -nostdinc -lncurses -s -Wl,-elf2flt -L$(ROOTDIR)/lib $(ROOTDIR)/lib/crt0.o LDFLAGS_LIBTOOL = $(LDFLAGS) $(CFLAGS_LIBTOOL) LDFLAGS_NORMAL = $(LDFLAGS) $(CFLAGS_NORMAL) LDFLAGS_DEBUG = $(LDFLAGS) $(CFLAGS_DEBUG) LDFLAGS_PROFILE = $(LDFLAGS) $(CFLAGS_PROFILE) LDFLAGS_SHARED = $(LDFLAGS) $(CFLAGS_SHARED) LDFLAGS_DEFAULT = $(LDFLAGS_NORMAL) LINT = LINT_OPTS = LINT_LIBS = -lncurses PROGS = tack$x # Default library, for linking applications DEPS_CURSES = ../lib/libncurses.a ################################################################################ all: $(PROGS) sources: install: install.tack uninstall: uninstall.tack # this line simplifies the configure-script libs \ install.libs \ uninstall.libs: EDITARGS = $(DESTDIR)$(mandir) $(srcdir) $(srcdir)/*.[0-9]* install.tack: $(PROGS) \ $(DESTDIR)$(bindir) \ $(DESTDIR)$(mandir) $(LIBTOOL_INSTALL) $(INSTALL_PROGRAM) tack$x $(DESTDIR)$(bindir)/tack$x sh ../edit_man.sh normal installing $(EDITARGS) uninstall.tack: -@$(LIBTOOL_UNINSTALL) rm -f $(DESTDIR)$(bindir)/tack$x -sh ../edit_man.sh normal removing $(EDITARGS) $(DESTDIR)$(bindir) \ $(DESTDIR)$(mandir) : sh $(srcdir)/../mkinstalldirs $@ # # Rules for building tack # DEPS_TACK = \ $(MODEL)/ansi$o \ $(MODEL)/charset$o \ $(MODEL)/color$o \ $(MODEL)/control$o \ $(MODEL)/crum$o \ $(MODEL)/edit$o \ $(MODEL)/fun$o \ $(MODEL)/init$o \ $(MODEL)/menu$o \ $(MODEL)/modes$o \ $(MODEL)/output$o \ $(MODEL)/pad$o \ $(MODEL)/scan$o \ $(MODEL)/sync$o \ $(MODEL)/sysdep$o \ $(MODEL)/tack$o tack$x: $(DEPS_TACK) $(DEPS_CURSES) $(LINK) $(DEPS_TACK) $(LDFLAGS_DEFAULT) -o $@ # # Utility productions start here # tags: ctags *.[ch] TAGS: etags *.[ch] mostlyclean :: -rm -f core tags TAGS *~ *.bak *.i *.atac trace clean :: mostlyclean -sh -c "if test -n '$x' ; then $(MAKE) clean x=''; fi" -rm -f $(PROGS) -rm -rf .libs distclean :: clean -rm -f Makefile realclean :: distclean tack.tar: Makefile.in modules *.[ch] tack.1 HISTORY COPYING tar -cvf tack.tar Makefile.in modules *.[ch] tack.1 HISTORY COPYING # These rules are used to allow "make -n" to work on a clean directory-tree ../include/hashsize.h \ ../include/parametrized.h \ ../include/term.h : cd ../include; $(MAKE) $(CF_MFLAGS) $(DEPS_CURSES) : cd ../ncurses; $(MAKE) $(CF_MFLAGS) lint: $(LINT) $(LINT_OPTS) $(CPPFLAGS) $(srcdir)/*.c $(LINT_LIBS) ############################################################################### # The remainder of this file is automatically generated during configuration ############################################################################### # generated by mk-0th.awk # libname: tack # subsets: termlib+ext_tinfo+base+ext_funcs .SUFFIXES: .c .cc .h .i .ii .c.i : $(CPP) $(CPPFLAGS) $< >$@ .cc.ii : $(CPP) $(CPPFLAGS) $< >$@ .h.i : $(CPP) $(CPPFLAGS) $< >$@ C_SRC = \ $(srcdir)/ansi.c \ $(srcdir)/charset.c \ $(srcdir)/color.c \ $(srcdir)/control.c \ $(srcdir)/crum.c \ $(srcdir)/edit.c \ $(srcdir)/fun.c \ $(srcdir)/init.c \ $(srcdir)/menu.c \ $(srcdir)/modes.c \ $(srcdir)/output.c \ $(srcdir)/pad.c \ $(srcdir)/scan.c \ $(srcdir)/sync.c \ $(srcdir)/sysdep.c \ $(srcdir)/tack.c lintlib : @echo no action needed # generated by mk-1st.awk (subset=termlib+ext_tinfo+base+ext_funcs) # name: tack # traces: DEBUG # MODEL: NORMAL # model: objects # prefix: lib # suffix: .a # subset: termlib+ext_tinfo+base+ext_funcs # ShlibVer: auto # ShlibVerInfix: no # DoLinks: no # rmSoLocs: no # ldconfig: : # overwrite: yes # depend: ../include/ncurses_cfg.h # host: arm-unknown-elf NORMAL_OBJS = \ ../objects/ansi$o \ ../objects/charset$o \ ../objects/color$o \ ../objects/control$o \ ../objects/crum$o \ ../objects/edit$o \ ../objects/fun$o \ ../objects/init$o \ ../objects/menu$o \ ../objects/modes$o \ ../objects/output$o \ ../objects/pad$o \ ../objects/scan$o \ ../objects/sync$o \ ../objects/sysdep$o \ ../objects/tack$o $(NORMAL_OBJS) : ../include/ncurses_cfg.h mostlyclean:: -rm -f $(NORMAL_OBJS) clean :: -rm -f $(NORMAL_OBJS) # generated by mk-2nd.awk # model: objects # MODEL: NORMAL # echo: yes # subset: termlib+ext_tinfo+base+ext_funcs # crenames: yes # cxxrenames: # traces: DEBUG # srcdir: . ../objects/ansi$o : $(srcdir)/ansi.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/ansi.c -o ../objects/ansi$o ../objects/charset$o : $(srcdir)/charset.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/charset.c -o ../objects/charset$o ../objects/color$o : $(srcdir)/color.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/color.c -o ../objects/color$o ../objects/control$o : $(srcdir)/control.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/control.c -o ../objects/control$o ../objects/crum$o : $(srcdir)/crum.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/crum.c -o ../objects/crum$o ../objects/edit$o : $(srcdir)/edit.c \ $(srcdir)/tack.h \ ../include/term.h \ $(INCDIR)/tic.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/edit.c -o ../objects/edit$o ../objects/fun$o : $(srcdir)/fun.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/fun.c -o ../objects/fun$o ../objects/init$o : $(srcdir)/init.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/init.c -o ../objects/init$o ../objects/menu$o : $(srcdir)/menu.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/menu.c -o ../objects/menu$o ../objects/modes$o : $(srcdir)/modes.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/modes.c -o ../objects/modes$o ../objects/output$o : $(srcdir)/output.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/output.c -o ../objects/output$o ../objects/pad$o : $(srcdir)/pad.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/pad.c -o ../objects/pad$o ../objects/scan$o : $(srcdir)/scan.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/scan.c -o ../objects/scan$o ../objects/sync$o : $(srcdir)/sync.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/sync.c -o ../objects/sync$o ../objects/sysdep$o : $(srcdir)/sysdep.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/sysdep.c -o ../objects/sysdep$o ../objects/tack$o : $(srcdir)/tack.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_NORMAL) -c ../tack/tack.c -o ../objects/tack$o # generated by mk-1st.awk (subset=termlib+ext_tinfo+base+ext_funcs) # name: tack # traces: DEBUG # MODEL: DEBUG # model: obj_g # prefix: lib # suffix: _g.a # subset: termlib+ext_tinfo+base+ext_funcs # ShlibVer: auto # ShlibVerInfix: no # DoLinks: no # rmSoLocs: no # ldconfig: : # overwrite: yes # depend: ../include/ncurses_cfg.h # host: arm-unknown-elf DEBUG_OBJS = \ ../obj_g/ansi$o \ ../obj_g/charset$o \ ../obj_g/color$o \ ../obj_g/control$o \ ../obj_g/crum$o \ ../obj_g/edit$o \ ../obj_g/fun$o \ ../obj_g/init$o \ ../obj_g/menu$o \ ../obj_g/modes$o \ ../obj_g/output$o \ ../obj_g/pad$o \ ../obj_g/scan$o \ ../obj_g/sync$o \ ../obj_g/sysdep$o \ ../obj_g/tack$o $(DEBUG_OBJS) : ../include/ncurses_cfg.h mostlyclean:: -rm -f $(DEBUG_OBJS) clean :: -rm -f $(DEBUG_OBJS) # generated by mk-2nd.awk # model: obj_g # MODEL: DEBUG # echo: yes # subset: termlib+ext_tinfo+base+ext_funcs # crenames: yes # cxxrenames: # traces: DEBUG # srcdir: . ../obj_g/ansi$o : $(srcdir)/ansi.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/ansi.c -o ../obj_g/ansi$o ../obj_g/charset$o : $(srcdir)/charset.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/charset.c -o ../obj_g/charset$o ../obj_g/color$o : $(srcdir)/color.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/color.c -o ../obj_g/color$o ../obj_g/control$o : $(srcdir)/control.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/control.c -o ../obj_g/control$o ../obj_g/crum$o : $(srcdir)/crum.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/crum.c -o ../obj_g/crum$o ../obj_g/edit$o : $(srcdir)/edit.c \ $(srcdir)/tack.h \ ../include/term.h \ $(INCDIR)/tic.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/edit.c -o ../obj_g/edit$o ../obj_g/fun$o : $(srcdir)/fun.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/fun.c -o ../obj_g/fun$o ../obj_g/init$o : $(srcdir)/init.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/init.c -o ../obj_g/init$o ../obj_g/menu$o : $(srcdir)/menu.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/menu.c -o ../obj_g/menu$o ../obj_g/modes$o : $(srcdir)/modes.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/modes.c -o ../obj_g/modes$o ../obj_g/output$o : $(srcdir)/output.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/output.c -o ../obj_g/output$o ../obj_g/pad$o : $(srcdir)/pad.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/pad.c -o ../obj_g/pad$o ../obj_g/scan$o : $(srcdir)/scan.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/scan.c -o ../obj_g/scan$o ../obj_g/sync$o : $(srcdir)/sync.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/sync.c -o ../obj_g/sync$o ../obj_g/sysdep$o : $(srcdir)/sysdep.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/sysdep.c -o ../obj_g/sysdep$o ../obj_g/tack$o : $(srcdir)/tack.c \ $(srcdir)/tack.h \ ../include/term.h $(LIBTOOL_COMPILE) $(CC) $(CFLAGS_DEBUG) -c ../tack/tack.c -o ../obj_g/tack$o depend : $(AUTO_SRC) makedepend -- $(CPPFLAGS) -- $(C_SRC) # DO NOT DELETE THIS LINE -- make depend depends on it.