summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt.opengl/gtk/gl_library/make_gtk.mak
blob: d765b8bd5e416c4488ba531574a4a8b9e2bd0fad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#*******************************************************************************
# Copyright (c) 2000, 2003 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials 
# are made available under the terms of the Common Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/cpl-v10.html
# 
# Contributors:
#     IBM Corporation - initial API and implementation
#*******************************************************************************

# Define the installation directories for various products.
JAVA_HOME   = /bluebird/teamswt/swt-builddir/ive/bin

CC=gcc
LD=gcc

# Define the various shared libraries to be made.
WS_PREFIX    = gtk
GL_PREFIX   = gl
GL_DLL      = lib$(GL_PREFIX)-$(WS_PREFIX).so
GL_OBJ      = gl.o glu.o structs.o glx.o
GL_LIB      = -shared -L/usr/X11R6/lib -lGL -lGLU -lm
XGTK_PREFIX   = xgtk
XGTK_DLL      = lib$(XGTK_PREFIX)-$(WS_PREFIX).so
XGTK_OBJ      = xgtk.o
XGTK_LIB      = -shared  `pkg-config --libs gtk+-2.0 gthread-2.0`

#
# The following CFLAGS are for compiling the SWT OpenGL libraries.
#
CFLAGS =  -O -Wall \
	-I./ \
	-I$(JAVA_HOME)/include \
	`pkg-config --cflags gtk+-2.0`

all: make_gl make_xgtk

make_gl: $(GL_DLL)
	$(LD) $(GL_LIB) -o $(GL_DLL) $(GL_OBJ)

$(GL_DLL): $(GL_OBJ)
	$(CC) $(CFLAGS) -c glx.c

make_xgtk: $(XGTK_DLL)
	$(LD) $(XGTK_LIB) -o $(XGTK_DLL) $(XGTK_OBJ)

$(XGTK_DLL): $(XGTK_OBJ)
	$(CC) $(CFLAGS) -c xgtk.c

clean:
	rm -f *.so *.o