Re: [gtk-list] Re: Compiling options

 > Um... if you don't have the library[1], you can't compile programs.

No... the machine I am on has the libraries and the GTK program will
compile and run on it. I want to compile the program so that it will not
use DLL. ie. include all needed libraries to run independently.

> You can compile GTK programs and then *run* them on machines that don't have
> GTK installed,

Below is the Makefile with all the options


CC              = gcc
CFLAGS          = -Wall -O2 -static
HOME            = /home/nichols/gtk/sonar
HEADERS         = -I$(HOME)/include

INC_DIR         = $(HOME)/include
OBJ_DIR         = $(HOME)/bin/objects
EXE_DIR         = $(HOME)/bin

INCLUDES        = $(INC_DIR)/filesel.h $(INC_DIR)/image.h

OBJECTS         = $(OBJ_DIR)/filesel.o $(OBJ_DIR)/image.o

all: xsonar
default: all

image.o: image.c
        $(CC) $(CFLAGS) -c `gtk-config --cflags`  image.c -o

filesel.o: filesel.c
        $(CC) $(CFLAGS) -c `gtk-config --cflags`  filesel.c -o

sonar.o: sonar.c
        $(CC) $(CFLAGS) -c `gtk-config --cflags`  sonar.c -o

xsonar: xsonar.c filesel.o image.o sonar.o $(INCLUDES) $(OBJECTS)
        $(CC) $(CFLAGS) `gtk-config --cflags` `gtk-config --libs`
$(OBJ_DIR)/filesel.o $(OBJ_DIR)/image.o $(OBJ_DIR)/
sonar.o xsonar.c -o $(EXE_DIR)/xsonar

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]