libs-gui/Source/Makefile.in
Scott Christley aee90a695e Convert to the GNUstep makefile package.
The config.h files should not be installed with the other
header files; it is only used for compilation, so the source
files should include it not the header files.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@2439 72102866-910b-0410-8b05-ffd578937521
1997-09-23 22:43:24 +00:00

397 lines
9.2 KiB
Makefile

# @configure_input@
#
# Main makefile for GNUstep GUI Library
# Copyright (C) 1996, 1996 Free Software Foundation, Inc.
#
# Author: Scott Christley <scottc@net-community.com>
#
# This file is part of the GNUstep GUI Library.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# If you are interested in a warranty or support for this source code,
# contact Scott Christley at scottc@net-community.com
#
# You should have received a copy of the GNU Library General Public
# License along with this library; see the file COPYING.LIB.
# If not, write to the Free Software Foundation,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
SHELL = /bin/sh
#### Start of system configuration section. ####
# The main executable or library
MAIN_FILE=libgnustep-gui
srcdir = @srcdir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
libdir = @libdir@
gnustep_libdir = $(libdir)/gnustep
includedir = @includedir@
bindir = @bindir@
MAKEDEFINES =
CC = @CC@
CPPFLAGS = @CPPFLAGS@
CFLAGS = -g -O -Wall $(GCCFLAGS)
ALL_CPPFLAGS = $(CPPFLAGS) -I../Headers
ALL_CFLAGS = $(ALL_CPPFLAGS) $(CFLAGS)
DEFS = -DGNUSTEP_INSTALL_LIBDIR=\"$(gnustep_libdir)\" @DEFS@
GCC_LIB =
SYS_LIBS =
ADD_LIBS = @LIBS@
exeext =
oext = .o
libext = .a
resext = .res
rcext = .rc
LN_S = @LN_S@
LDFLAGS = @LDFLAGS@ -o
LD = ld
LDOUT =
AR = ar
AROUT =
ARFLAGS = rc
RANLIB = @RANLIB@
RC =
DLLTOOL = @DLLTOOL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INIT_FILE =
INIT_FILE_OBJ=$(INIT_FILE)$(oext)
#### End of system configuration section. ####
include $(srcdir)/../Version
GNUSTEP1_HEADERS = gui/AppKit.h \
gui/NSActionCell.h \
gui/NSApplication.h \
gui/NSBitmapImageRep.h \
gui/NSBox.h \
gui/NSBrowser.h \
gui/NSBrowserCell.h \
gui/NSButton.h \
gui/NSButtonCell.h \
gui/NSCStringText.h \
gui/NSCachedImageRep.h \
gui/NSCell.h \
gui/NSClipView.h \
gui/NSColor.h \
gui/NSColorList.h \
gui/NSColorPanel.h \
gui/NSColorPicker.h \
gui/NSColorPicking.h \
gui/NSColorWell.h \
gui/NSControl.h \
gui/NSCursor.h \
gui/NSCustomImageRep.h
GNUSTEP2_HEADERS = gui/NSDataLink.h \
gui/NSDataLinkManager.h \
gui/NSDataLinkPanel.h \
gui/NSDragging.h \
gui/NSEPSImageRep.h \
gui/NSEvent.h \
gui/NSFont.h \
gui/NSFontManager.h \
gui/NSFontPanel.h \
gui/NSForm.h \
gui/NSFormCell.h \
gui/NSGraphics.h \
gui/NSHelpPanel.h \
gui/NSImage.h \
gui/NSImageRep.h \
gui/NSMatrix.h \
gui/NSMenu.h \
gui/NSMenuItem.h \
gui/NSNibLoading.h \
gui/NSOpenPanel.h \
gui/NSPageLayout.h \
gui/NSPanel.h \
gui/NSPasteboard.h \
gui/NSPopUpButton.h \
gui/NSPrintInfo.h \
gui/NSPrintOperation.h \
gui/NSPrintPanel.h
GNUSTEP3_HEADERS = gui/NSPrinter.h \
gui/NSResponder.h \
gui/NSSavePanel.h \
gui/NSScreen.h \
gui/NSScrollView.h \
gui/NSScroller.h \
gui/NSSelection.h \
gui/NSSlider.h \
gui/NSSliderCell.h \
gui/NSSpellChecker.h \
gui/NSSpellProtocol.h \
gui/NSSpellServer.h \
gui/NSSplitView.h \
gui/NSText.h \
gui/NSTextField.h \
gui/NSTextFieldCell.h \
gui/NSView.h \
gui/NSWindow.h \
gui/NSWorkspace.h \
gui/TrackingRectangle.h \
gui/config.h \
gui/nsimage-tiff.h \
gui/PSMatrix.h
GNUSTEP_DPS_HEADERS = dps/NSDPSContext.h \
dps/DPSOperators.h \
dps/TypesandConstants.h
OBJS_WITHOUT_INIT = $(MAIN_FILE)$(oext) \
NSActionCell$(oext) \
NSApplication$(oext) \
NSBitmapImageRep$(oext) \
NSBox$(oext) \
NSBrowser$(oext) \
NSBrowserCell$(oext) \
NSBundleAdditions$(oext) \
NSButton$(oext) \
NSButtonCell$(oext) \
NSCStringText$(oext) \
NSCachedImageRep$(oext) \
NSCell$(oext) \
NSClipView$(oext) \
NSColor$(oext) \
NSColorList$(oext) \
NSColorPanel$(oext) \
NSColorPicker$(oext) \
NSColorWell$(oext) \
NSControl$(oext) \
NSCursor$(oext) \
NSCustomImageRep$(oext) \
NSDataLink$(oext) \
NSDataLinkManager$(oext) \
NSDataLinkPanel$(oext) \
NSDPSContext$(oext) \
NSEPSImageRep$(oext) \
NSEvent$(oext) \
NSFont$(oext) \
NSFontManager$(oext) \
NSFontPanel$(oext) \
NSForm$(oext) \
NSFormCell$(oext) \
NSHelpPanel$(oext) \
NSImage$(oext) \
NSImageRep$(oext) \
NSMatrix$(oext) \
NSMenu$(oext) \
NSMenuItem$(oext) \
NSOpenPanel$(oext) \
NSPageLayout$(oext) \
NSPanel$(oext) \
NSPasteboard$(oext) \
NSPrinter$(oext) \
NSPrintInfo$(oext) \
NSPrintOperation$(oext) \
NSPrintPanel$(oext) \
NSPopUpButton$(oext) \
NSResponder$(oext) \
NSSavePanel$(oext) \
NSScreen$(oext) \
NSScroller$(oext) \
NSScrollView$(oext) \
NSSelection$(oext) \
NSSlider$(oext) \
NSSliderCell$(oext) \
NSSpellChecker$(oext) \
NSSpellServer$(oext) \
NSSplitView$(oext) \
NSText$(oext) \
NSTextField$(oext) \
NSTextFieldCell$(oext) \
NSView$(oext) \
NSWindow$(oext) \
NSWorkspace$(oext) \
TrackingRectangle$(oext) \
PSMatrix$(oext) \
tiff$(oext) \
externs$(oext)
OBJS = $(OBJS_WITHOUT_INIT)
.SUFFIXES: .m
.m$(oext):
$(CC) @OBJC_RUNTIME_FLAG@ -c $(ALL_CFLAGS) $(DEFS) -o $@ $<
.c$(oext):
$(CC) -c $(ALL_CFLAGS) $(DEFS) -o $@ $<
#
# libraries
#
LIBS = $(GCC_LIB) $(SYS_LIBS) $(ADD_LIBS)
IMPORT_LIBRARY=@IMPORT_LIBRARY@
#
# targets
#
all: header_links src gpbs
header_links:
-rm -rf ../Headers/AppKit
$(LN_S) ../Headers/gnustep/gui ../Headers/AppKit
-rm -rf ../Headers/DPSClient
$(LN_S) ../Headers/gnustep/dps ../Headers/DPSClient
src: @STATIC_LIBRARY@ @SHARED_LIBRARY@
gpbs: gpbs.m
$(CC) $(ALL_CPPFLAGS) $(DEFS) $(ALL_OBJCFLAGS) -g -w -o $@ $< \
NSPasteboard.o $(LIBS)
# library
$(MAIN_FILE)$(libext): $(OBJS)
$(AR) $(ARFLAGS) $(AROUT)$(MAIN_FILE)$(libext) $(OBJS)
$(RANLIB) $(MAIN_FILE)$(libext)
# static library when building DLL
$(MAIN_FILE)_s$(libext): $(OBJS)
$(AR) $(ARFLAGS) $(AROUT)$(MAIN_FILE)_s$(libext) $(OBJS)
$(RANLIB) $(MAIN_FILE)_s$(libext)
$(MAIN_FILE).def: FORCE
nm @STATIC_LIBRARY@ \
| grep '^........ [T] _' \
| sed 's/[^_]*_//' >> $(MAIN_FILE).lst
cat win32-def.top $(MAIN_FILE).lst > $(MAIN_FILE).def
rm $(MAIN_FILE).lst
# build DLL
$(MAIN_FILE).dll: @STATIC_LIBRARY@ win32-entry$(oext)
# Link DLL.
$(CC) -dll -Wl,--base-file -Wl,$(MAIN_FILE).base \
-o $(MAIN_FILE).dll @STATIC_LIBRARY@ win32-entry$(oext) \
-ltiff -lgnustep-base \
-lmoldname -lobjc -lkernel32 -lwsock32 -ladvapi32
$(DLLTOOL) --dllname $(MAIN_FILE).dll \
--def $(MAIN_FILE).def --base-file \
$(MAIN_FILE).base --output-exp $(MAIN_FILE).exp
$(CC) -dll -Wl,--base-file -Wl,$(MAIN_FILE).base \
$(MAIN_FILE).exp \
-o $(MAIN_FILE).dll @STATIC_LIBRARY@ win32-entry$(oext) \
-ltiff -lgnustep-base \
-lmoldname -lobjc -lkernel32 -lwsock32 -ladvapi32
$(DLLTOOL) --dllname $(MAIN_FILE).dll \
--def $(MAIN_FILE).def \
--base-file $(MAIN_FILE).base \
--output-exp $(MAIN_FILE).exp
$(CC) -dll $(MAIN_FILE).exp \
-o $(MAIN_FILE).dll @STATIC_LIBRARY@ win32-entry$(oext) \
-ltiff -lgnustep-base \
-lmoldname -lobjc -lkernel32 -lwsock32 -ladvapi32
# Build the import library to link to:
$(DLLTOOL) --dllname $(MAIN_FILE).dll \
--def $(MAIN_FILE).def \
--output-lib $(IMPORT_LIBRARY)
ar r $(IMPORT_LIBRARY) externs$(oext)
#
# Initialization routine
#
$(INIT_FILE_OBJ): $(OBJS_WITHOUT_INIT)
nm $(OBJS_WITHOUT_INIT) | grep " __GLOBAL_" > tmpinit.c
collect tmpinit.c $(INIT_FILE)
$(CC) $(ALL_CFLAGS) $(INIT_FILE).c
rm tmpinit.c
install: installdirs install-lib install-headers
installdirs:
$(srcdir)/../mkinstalldirs \
$(libdir) \
$(libdir)/gnustep \
$(includedir)/gnustep \
$(includedir)/gnustep/dps \
$(includedir)/gnustep/gui
install-lib: src
$(INSTALL_PROGRAM) $(MAIN_FILE)$(libext) $(libdir)
$(RANLIB) $(libdir)/$(MAIN_FILE)$(libext)
# Install the static library if it exists
if [ -e $(MAIN_FILE)_s$(libext) ]; then \
$(INSTALL_DATA) $(MAIN_FILE)_s$(libext) $(libdir) ; \
$(RANLIB) $(libdir)/$(MAIN_FILE)_s$(libext) ; \
fi
# Install the DLL if it exists
if [ -e $(MAIN_FILE).dll ]; then \
$(INSTALL_DATA) $(MAIN_FILE).dll $(bindir) ; \
fi
install-headers:
for file in $(GNUSTEP1_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
for file in $(GNUSTEP2_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
for file in $(GNUSTEP3_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
for file in $(GNUSTEP_DPS_HEADERS); do \
$(INSTALL_DATA) ../Headers/gnustep/$$file \
$(includedir)/gnustep/$$file ; \
done
cd $(includedir); rm -rf AppKit; $(LN_S) ./gnustep/gui ./AppKit
cd $(includedir); rm -rf DPSClient; $(LN_S) ./gnustep/dps ./DPSClient
# end of install targets
uninstall:
rm -rf $(includedir)/gnustep/dps
rm -rf $(includedir)/gnustep/gui
rm -rf $(includedir)/AppKit
rm -rf $(includedir)/DPSClient
rm -f $(libdir)/$(MAIN_FILE)$(libext)
rm -f $(libdir)/$(MAIN_FILE)_s$(libext)
rm -f $(bindir)/$(MAIN_FILE).dll
Makefile: $(srcdir)/Makefile.in ../config.status
cd ..; $(SHELL) config.status
#
# Cleaning
#
mostlyclean:
clean:
rm -f *~
rm -f *$(oext)
rm -f $(MAIN_FILE)$(libext)
rm -f $(MAIN_FILE)_s$(libext)
rm -f $(MAIN_FILE).dll $(MAIN_FILE).exp $(MAIN_FILE).base
rm -f $(INIT_FILE).c
distclean: clean
rm -f Makefile
maintainer-clean: distclean
FORCE: