* use new x11 package

This commit is contained in:
peter 1999-12-23 19:41:28 +00:00
parent f814579d8d
commit e8ce2f1687
10 changed files with 115 additions and 184 deletions

View File

@ -1,5 +1,5 @@
#
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 14:38
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 20:20
#
defaultrule: all

View File

@ -28,7 +28,7 @@
unit GL;
interface
uses XLib;
uses X,XLib,XUtil;
// ===================================================================
// Unit specific extensions

View File

@ -62,14 +62,14 @@ const
type
// From XLib:
XPixmap = XID;
XFont = XID;
XColormap = XID;
XPixmap = TXID;
XFont = TXID;
XColormap = TXID;
GLXContext = Pointer;
GLXPixmap = XID;
GLXDrawable = XID;
GLXContextID = XID;
GLXPixmap = TXID;
GLXDrawable = TXID;
GLXContextID = TXID;
var
%END

View File

@ -1,5 +1,5 @@
#
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 14:38
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 20:33
#
defaultrule: all
@ -159,10 +159,20 @@ endif
ifndef COMPONENTDIR
COMPONENTDIR=$(FPCDIR)/components
endif
override NEEDUNITDIR=../$(OS_TARGET)
# Packages
override PACKAGES+=opengl x11
ifneq ($(wildcard $(PACKAGEDIR)/opengl/$(OS_TARGET)),)
override NEEDUNITDIR+=$(PACKAGEDIR)/opengl/$(OS_TARGET)
else
override NEEDUNITDIR+=$(PACKAGEDIR)/opengl
endif
ifneq ($(wildcard $(PACKAGEDIR)/x11/$(OS_TARGET)),)
override NEEDUNITDIR+=$(PACKAGEDIR)/x11/$(OS_TARGET)
else
override NEEDUNITDIR+=$(PACKAGEDIR)/x11
endif
# Libraries
@ -675,7 +685,28 @@ rtl_package:
endif
endif
.PHONY: rtl_package
PACKAGEOPENGL=1
PACKAGEX11=1
ifdef PACKAGEOPENGL
ifneq ($(wildcard $(PACKAGEDIR)/opengl),)
ifeq ($(wildcard $(PACKAGEDIR)/opengl/$(FPCMADE)),)
override COMPILEPACKAGES+=opengl
opengl_package:
$(MAKE) -C $(PACKAGEDIR)/opengl all
endif
endif
endif
ifdef PACKAGEX11
ifneq ($(wildcard $(PACKAGEDIR)/x11),)
ifeq ($(wildcard $(PACKAGEDIR)/x11/$(FPCMADE)),)
override COMPILEPACKAGES+=x11
x11_package:
$(MAKE) -C $(PACKAGEDIR)/x11 all
endif
endif
endif
.PHONY: rtl_package opengl_package x11_package
#####################################################################
# Exes
@ -745,12 +776,12 @@ fpc_smart:
fpc_shared: all
ifdef inlinux
ifndef LIBNAME
@$(ECHO) LIBNAME not set
@$(ECHO) "LIBNAME not set"
else
$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
endif
else
@$(ECHO) Shared Libraries not supported
@$(ECHO) "Shared Libraries not supported"
endif
#####################################################################
@ -778,19 +809,19 @@ endif
fpc_showinstall: $(SHOWINSTALLTARGET)
ifdef INSTALLEXEFILES
@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
endif
ifdef INSTALLPPUFILES
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
ifneq ($(INSTALLPPULINKFILES),)
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
endif
ifneq ($(INSTALLPPULIBFILES),)
@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
@$(ECHO) -e $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
endif
endif
ifdef EXTRAINSTALLFILES
@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
@$(ECHO) -e $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
endif
fpc_install: $(INSTALLTARGET)
@ -859,8 +890,8 @@ endif
# Note: This will not remove the zipfile first
fpc_zipinstalladd:
ifndef ZIPNAME
@$(ECHO) Please specify ZIPNAME!
@exit
@$(ECHO) "Please specify ZIPNAME!"
@exit 1
else
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
ifdef inlinux
@ -876,8 +907,8 @@ endif
# First remove the zip and then install
fpc_zipinstall:
ifndef ZIPNAME
@$(ECHO) Please specify ZIPNAME!
@exit
@$(ECHO) "Please specify ZIPNAME!"
@exit 1
else
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)

View File

@ -5,9 +5,11 @@
[targets]
programs=glutdemo
[packages]
packages=opengl x11
[dirs]
fpcdir=../../..
unitdir=../$(OS_TARGET)
[libs]
libother=1

View File

@ -1,5 +1,5 @@
#
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 14:38
# Makefile generated by fpcmake v0.99.13 on 1999-12-23 20:20
#
defaultrule: all
@ -59,6 +59,12 @@ else
SEARCHPATH=$(subst ;, ,$(PATH))
endif
#####################################################################
# Default target
#####################################################################
override OS_TARGET:=linux
#####################################################################
# FPC version/target Detection
#####################################################################
@ -136,7 +142,7 @@ endif
# Targets
override UNITOBJECTS+=xlib gl glut
override UNITOBJECTS+=gl glut
# Clean
@ -162,6 +168,12 @@ endif
# Packages
override PACKAGES+=x11
ifneq ($(wildcard $(PACKAGEDIR)/x11/$(OS_TARGET)),)
override NEEDUNITDIR+=$(PACKAGEDIR)/x11/$(OS_TARGET)
else
override NEEDUNITDIR+=$(PACKAGEDIR)/x11
endif
# Libraries
@ -285,6 +297,10 @@ ifdef UNITSDIR
override FPCOPT+=-Fu$(UNITSDIR)
endif
ifdef NEEDUNITDIR
override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
endif
# Smartlinking
ifdef SMARTLINK
override FPCOPT+=-CX
@ -657,7 +673,18 @@ rtl_package:
endif
endif
.PHONY: rtl_package
PACKAGEX11=1
ifdef PACKAGEX11
ifneq ($(wildcard $(PACKAGEDIR)/x11),)
ifeq ($(wildcard $(PACKAGEDIR)/x11/$(FPCMADE)),)
override COMPILEPACKAGES+=x11
x11_package:
$(MAKE) -C $(PACKAGEDIR)/x11 all
endif
endif
endif
.PHONY: rtl_package x11_package
#####################################################################
# Units
@ -726,12 +753,12 @@ fpc_smart:
fpc_shared: all
ifdef inlinux
ifndef LIBNAME
@$(ECHO) LIBNAME not set
@$(ECHO) "LIBNAME not set"
else
$(PPUMOVE) $(SHAREDLIBUNITOBJECTS) -o$(LIBNAME)
endif
else
@$(ECHO) Shared Libraries not supported
@$(ECHO) "Shared Libraries not supported"
endif
#####################################################################
@ -759,19 +786,19 @@ endif
fpc_showinstall: $(SHOWINSTALLTARGET)
ifdef INSTALLEXEFILES
@$(ECHO) $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
@$(ECHO) -e $(addprefix "\n"$(BININSTALLDIR)/,$(INSTALLEXEFILES))
endif
ifdef INSTALLPPUFILES
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPUFILES))
ifneq ($(INSTALLPPULINKFILES),)
@$(ECHO) $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
@$(ECHO) -e $(addprefix "\n"$(UNITINSTALLDIR)/,$(INSTALLPPULINKFILES))
endif
ifneq ($(INSTALLPPULIBFILES),)
@$(ECHO) $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
@$(ECHO) -e $(addprefix "\n"$(LIBINSTALLDIR)/,$(INSTALLPPULIBFILES))
endif
endif
ifdef EXTRAINSTALLFILES
@$(ECHO) $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
@$(ECHO) -e $(addprefix "\n"$(EXTRAINSTALLDIR)/,$(EXTRAINSTALLFILES))
endif
fpc_install: $(INSTALLTARGET)
@ -840,8 +867,8 @@ endif
# Note: This will not remove the zipfile first
fpc_zipinstalladd:
ifndef ZIPNAME
@$(ECHO) Please specify ZIPNAME!
@exit
@$(ECHO) "Please specify ZIPNAME!"
@exit 1
else
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
ifdef inlinux
@ -857,8 +884,8 @@ endif
# First remove the zip and then install
fpc_zipinstall:
ifndef ZIPNAME
@$(ECHO) Please specify ZIPNAME!
@exit
@$(ECHO) "Please specify ZIPNAME!"
@exit 1
else
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)

View File

@ -2,8 +2,14 @@
# Makefile.fpc for Linux dynamic GL units
#
[defaults]
defaulttarget=linux
[targets]
units=xlib gl glut
units=gl glut
[packages]
packages=x11
[dirs]
fpcdir=../../..

View File

@ -28,7 +28,7 @@
unit GL;
interface
uses XLib;
uses X,XLib,XUtil;
// ===================================================================
// Unit specific extensions
@ -1617,14 +1617,14 @@ const
type
// From XLib:
XPixmap = XID;
XFont = XID;
XColormap = XID;
XPixmap = TXID;
XFont = TXID;
XColormap = TXID;
GLXContext = Pointer;
GLXPixmap = XID;
GLXDrawable = XID;
GLXContextID = XID;
GLXPixmap = TXID;
GLXDrawable = TXID;
GLXContextID = TXID;
var
glXChooseVisual: function(dpy: PDisplay; screen: Integer; var attribList: Integer): PXVisualInfo; cdecl; cdecl;
@ -2141,7 +2141,7 @@ end.
{
$Log$
Revision 1.1 1999-12-23 13:51:50 peter
* reorganized, it now doesn't depend on fcl anymore by default
Revision 1.2 1999-12-23 19:41:28 peter
* use new x11 package
}

View File

@ -396,7 +396,7 @@ end.
{
$Log$
Revision 1.1 1999-12-23 13:51:50 peter
* reorganized, it now doesn't depend on fcl anymore by default
Revision 1.2 1999-12-23 19:41:28 peter
* use new x11 package
}

View File

@ -1,135 +0,0 @@
{
$Id$
}
unit xlib;
{$MODE objfpc}
{$LINKLIB c}
{$LINKLIB X11}
{$PACKRECORDS C}
interface
type
XID = LongWord;
TVisualID = LongWord;
PDisplay = Pointer;
PVisual = Pointer;
PXVisualInfo = ^TXVisualInfo;
TXVisualInfo = record
visual: PVisual;
visualid: TVisualID;
screen, depth, c_class: LongInt;
red_mask, green_mask, blue_mask: LongWord;
colormap_size, bits_per_rgb: LongInt;
end;
const
VisualNoMask = 0;
VisualIDMask = 1;
VisualScreenMask = 2;
VisualDepthMask = 4;
VisualClassMask = 8;
VisualRedMaskMask = $10;
VisualGreenMaskMask = $20;
VisualBlueMaskMask = $40;
VisualColormapSizeMask = $80;
VisualBitsPerRGBMask = $100;
VisualAllMask = $1FF;
function DefaultScreen(dpy: PDisplay): LongInt;
function XFree(data: Pointer): LongInt; cdecl;
function XVisualIDFromVisual(visual: PVisual): TVisualID; cdecl;
function XGetVisualInfo(display: PDisplay; vinfo_mask: LongWord; vinfo_template: PXVisualInfo; var nitems_return: LongInt): PXVisualInfo; cdecl;
implementation
type
PXExtData = Pointer;
PXPrivate = Pointer;
XPointer = PChar;
PXrmHashBucketRec = Pointer;
PScreenFormat = Pointer;
PScreen = Pointer;
PXPrivDisplay = ^TXPrivDisplay;
TXPrivDisplay = record
ext_data: PXExtData; // hook for extension to hang data
private1: PXPrivate;
fd: LongInt; // Network socket.
private2: LongInt;
proto_major_version: LongInt; // major version of server's X protocol
proto_minor_version: LongInt; // minor version of server's X protocol
vendor: PChar; // vendor of the server hardware
private3, private4, private5: XID;
private6: LongInt;
resource_alloc: Pointer; // allocator function
byte_order: LongInt; // screen byte order, LSBFirst, MSBFirst
bitmap_unit: LongInt; // padding and data requirements
bitmap_pad: LongInt; // padding requirements on bitmaps
bitmap_bit_order: LongInt; // LeastSignificant or MostSignificant
nformats: LongInt; // number of pixmap formats in list
pixmap_format: PScreenFormat; // pixmap format list
private8: LongInt;
release: LongInt; // release of the server
private9, private10: PXPrivate;
qlen: LongInt; // Length of input event queue
last_request_read: LongWord; // seq number of last event read
request: LongWord; // sequence number of last request.
private11, private12, private13,
private14: XPointer;
max_request_size: LongWord; // maximum number 32 bit words in request
db: PXrmHashBucketRec;
private15: Pointer;
display_name: PChar; // "host:display" string used on this connect
default_screen: LongInt; // default screen for operations
nscreens: LongInt; // number of screens on this server
screens: PScreen; // pointer to list of screens
motion_buffer: LongWord; // size of motion buffer
private16: LongWord;
min_keycode: LongInt; // minimum defined keycode
max_keycode: LongInt; // maximum defined keycode
private17, private18: XPointer;
private19: LongInt;
xdefaults: PChar; // contents of defaults from server
// there is more to this structure, but it is private to Xlib
end;
function DefaultScreen(dpy: PDisplay): LongInt;
begin
Result := PXPrivDisplay(dpy)^.default_screen;
end;
const
libX = 'X11';
function XFree(data: Pointer): LongInt; cdecl; external libX;
function XVisualIDFromVisual(visual: PVisual): TVisualID; cdecl; external libX;
function XGetVisualInfo(display: PDisplay; vinfo_mask: LongWord; vinfo_template: PXVisualInfo; var nitems_return: LongInt): PXVisualInfo; cdecl; external libX;
end.
{
$Log$
Revision 1.1 1999-12-23 13:51:50 peter
* reorganized, it now doesn't depend on fcl anymore by default
Revision 1.1 1999/11/28 17:55:22 sg
* Added new unit generation tools and auto-generated GL units for Linux
Revision 1.1 1999/11/10 14:15:33 sg
* Added to CVS
}