2 # Makefile for dlcompat
5 # Copyright (c) 2001 Christoph Pfisterer.
7 # Portions Copyright (c) 1999-2001 Apple Computer, Inc. All Rights
10 # This file contains Original Code and/or Modifications of Original
11 # Code as defined in and that are subject to the Apple Public Source
12 # License Version 1.2 (the "License"). You may not use this file
13 # except in compliance with the License. Please obtain a copy of the
14 # License at http://www.apple.com/publicsource and read it before
17 # The Original Code and all software distributed under the License are
18 # distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
19 # EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
20 # INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
21 # FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
22 # NON-INFRINGEMENT. Please see the License for the specific language
23 # governing rights and limitations under the License.
31 CFLAGS=-Wall -O2 -DDEBUG=$(DEBUG)
39 all: libdl.a libdl.dylib
42 if test ! -d $(prefix)/lib ; then mkdir $(prefix)/lib ; fi
43 $(INSTALL) -m 644 libdl.a $(prefix)/lib
44 $(RANLIB) $(prefix)/lib/libdl.a
45 chmod 644 $(prefix)/lib/libdl.a
46 $(INSTALL) -m 755 libdl.dylib $(prefix)/lib
47 if test ! -d $(prefix)/include ; then mkdir $(prefix)/include ; fi
48 $(INSTALL) -c -m 644 dlfcn.h $(prefix)/include
51 $(CC) $(CFLAGS) -fno-common -o $@ -c $<
58 $(CC) -dynamiclib -undefined error -o libdl.dylib $(OBJS) -install_name $(prefix)/lib/libdl.dylib