Menu

Compiling in Debian

Help
2006-04-09
2013-04-15
  • David Liontooth

    David Liontooth - 2006-04-09

    Hi Carl,

    I'd like to compile this in Debian, and use dh_make to get started. I get the receipt "Currently there is no top level Makefile." information about compiling is given in Readme.txt:

    /*  Unix/Linux:                       
    /*   cc -O -c -I/usr/X11R6/include otk_lib.c -o otk.o 
    /*    Link with:    -lGLU -lGL -lXmu -lXext -lX11                                     

    In debian/rules, I have

    CFLAGS = -Wall -g

    I'm guessing I can add "-lGLU -lGL -lXmu -lXext -lX11" to this line?

    Further down I have what looks like a build command:

    # Add here commands to compile the package.
    $(MAKE)

    However, this has a particular syntax I don't know. In brief, do you know how I can turn this into a Debian package? I don't like to just build stuff and install as I can't keep track of the files.

    Cheers,
    Dave

    PS I want this for opentaxsolver.

     
    • David Liontooth

      David Liontooth - 2006-04-09

      It would be useful if the package used autotools -- if we had a configure.in to start with, we could use autogen.sh to generate a makefile. Or of course a makefile.

      Dave

       
    • kindman

      kindman - 2006-04-17

      Dave,
      Good idea.  Will look into setting up a Makefile for Otk.  Help from anyone w/respect to Debian, welcome.
      Carl

       
    • Gary D Stewart

      Gary D Stewart - 2008-07-13

      Here is a shell script I use with Debian to compile small single file applications with:

      #!/bin/bash

      cc -I/usr/X11R6/include -L/usr/X11R6/lib "$1.c" -lGLU -lGL -lXmu -lXext -lX11 -lm -o $1

      $1 is the name of the application (Just the application name, no .c extension. The extension is included in the script)

      And here is what I use with Debian for a multi-file application:

      # Makefile for OTK applications
      #

      CC      = gcc
      CFLAGS  = -O1 -I/usr/X11R6/include -L/usr/X11R6/lib
      LINK    = gcc
      LIBS    = -lGLU -lGL -lXmu -lXext -lX11 -lm
      OBJS    = file1.o file2.o file3.o file4.o file5.o

      # cc -I/usr/X11R6/include -L/usr/X11R6/lib "$1.c" -lGLU -lGL -lXmu -lXext -lX11 -lm -o $1

      application_name : $(OBJS)
          $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)

      file1.o : file1.h (any other .h files needed)

      file2.o : file2.h (any other .h files needed)

      file3.o : file3.h (any other .h files needed)

      file4.o : file4.h (any other .h files needed)

      file5.o : file5.h (any other .h files needed)

      clean:

          rm $(OBJS)

       
    • Gary D Stewart

      Gary D Stewart - 2008-07-13

      P.S. It looks like the post software removed the tabs from in front of these lines

      $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)

      rm $(OBJS)

       
    • kindman

      kindman - 2008-07-22

      Dave,

      OTK is a library.  There is no need to do a Make on it by itself.
      Each application, such as OpenTaxSolver, can have a Makefile.

      I believe OpenTaxSolver does have a Makefile. You should only
      need to update the OTK lib under the OpenTaxSolver/src/GUI
      directory, and then run Make.  Make should detect the updated
      dependencies and recompile.

      Am not sure how to build a debian package.  Will look into that.

      Carl

       
    • kindman

      kindman - 2008-07-22

      Dave,

      OTK is a library. There is no need to do a Make on it by itself.
      Each application, such as OpenTaxSolver, can have a Makefile.

      I believe OpenTaxSolver does have a Makefile. You should only
      need to update the OTK lib under the OpenTaxSolver/src/GUI
      directory, and then run Make. Make should detect the updated
      dependencies and recompile.

      Am not sure how to build a debian package. Will look into that.

      Carl

       

Log in to post a comment.

MongoDB Logo MongoDB