genmake and genimake
genmake
genamake is a tiny bourne shell script to generate Makefiles. I wrote it because I wanted to generate simple Makefiles, not unreadable complex junks lots of auto Makefile generators create. genmake is stupid (I wanted it to be), it just looks for files with .c extension in the current working directory. genmake can create Makefile for a application or a library.

 

  • Download: genmake1.1.tar.gz

    To install:

            gunzip < genmake1.1.tar.gz | tar xvf -
    cd genmake1.1
    mkdir $HOME/head
    cp Makefile_* $HOME/head

    cp genmake to somehere in your path
    How to use
        Usage: genmake app app name  (for application)
    genmake lib libname (for library)
    In a directory if you have two files test.c and test2.c and if you type:
            genmake app test
    The following Makefile will be created:

    ##
    # Makefile automatically generated by genmake 1.0, Jun-06-99
    # genmake 1.0 by ma_muquit@fccc.edu
    ##
    CC= cc
    DEFS=
    PROGNAME= test
    INCLUDES= -I.
    LIBS=


    # replace -O with -g in order to debug

    DEFINES= $(INCLUDES) $(DEFS) -DSYS_UNIX=1
    CFLAGS= -O $(DEFINES)

    SRCS = test.c test2.c

    OBJS = test.o test2.o

    .c.o:
    rm -f $@
    $(CC) $(CFLAGS) -c $*.c

    all: $(PROGNAME)

    $(PROGNAME) : $(OBJS)
    $(CC) $(CFLAGS) -o $(PROGNAME) $(OBJS) $(LIBS)

    clean:
    rm -f $(OBJS) $(PROGNAME) core
    To generate the Makefile for a library, type:
        genmake lib libtest.a
    The following Makefile will be created:

    ##
    # Jun-06-1999
    # genmake 1.0 by ma_muquit@fccc.edu
    ##
    CC= cc
    DEFS=
    AR= ar cq
    RANLIB= ranlib
    LIBNAME= libtest.a

    INCLUDES= -I. -I..

    # replace -O with -g in order to debug

    DEFINES= $(INCLUDES) $(DEFS) -DSYS_UNIX=1
    CFLAGS= -O $(DEFINES)

    SRCS = test.c test2.c

    OBJS = test.o test2.o

    .c.o:
    rm -f $@
    $(CC) $(CFLAGS) -c $*.c

    all: $(LIBNAME)

    $(LIBNAME) : $(OBJS)
    rm -f $@
    $(AR) $@ $(OBJS)
    $(RANLIB) $@


    clean:
    rm -f $(OBJS) $(LIBNAME) core

    genimake
    genimake is another tiny bourne shell script but nothing like genmake :) It creates a complete skeleton Motif application and the ImakeFile.

     

  • Download: genimake1.1.tar.gz
    To install:

    gunzip < genmake1.1.tar.gz | tar xvf -
    cd genimake1.1
    mkdir $HOME/head
    cp ./skel/* $HOME/head

    cp genimake to somehere in your path
    How to use
        Usage: genimake app   (for app)
    genimake lib (for lib) <- does not work at this time
    To make a skelon motif app xyz, type:
        genimage app xyz
    The following files will be created in the current working directory:

    ImakeFile - The Imake file.
    ad2c - The script to convert app default resource file to header file.
    xyz.ad - The X Resources file.
    xyz.ad.h - The X Resources header file created from xyz.ad by ad2c script.
    appdef.h - The header file just includes xyz.ad.h.
    crui.c - The user interface file, ready to be modified.
    main.c - The main C file
    xutils.c - Contains some utility routines
    xyz.tmpl - The template included from Imakefile. Edit this instead of
    ImakeFile
    You can compile the add by typing:
        xmkmf
    make
    You can run the app by typing: ./xyz. It will show a tiny window.
  • arrow
    arrow
      全站熱搜

      Bluelove1968 發表在 痞客邦 留言(0) 人氣()