r3520: *** empty log message ***
[uffi.git] / examples / Makefile
1 # FILE IDENTIFICATION
2 #
3 #  Name:         Makefile
4 #  Purpose:      Makefile for UFFI examples
5 #  Programer:    Kevin M. Rosenberg
6 #  Date Started: Mar 2002
7 #
8 #  CVS Id:   $Id: Makefile,v 1.17 2002/11/29 11:10:08 kevin Exp $
9 #
10 # This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
11 #
12 # UFFI users are granted the rights to distribute and use this software
13 # as governed by the terms of the Lisp Lesser GNU Public License
14 # (http://opensource.franz.com/preamble.html), also known as the LLGPL.
15
16 SUBDIRS:=
17
18 include ../Makefile.common
19
20 .PHONY: distclean
21 distclean: clean
22
23
24 base=c-test-fns
25 source=$(base).c
26 object=$(base).o
27 shared_lib=$(base).so
28
29 .PHONY: all
30 all: $(shared_lib)
31
32 linux: $(source) Makefile
33         gcc -fPIC -DPIC -c $(source) -o $(object)
34         gcc -shared $(object) -o $(shared_lib)
35         rm $(object)
36
37 mac:
38         cc -dynamic -c $(source) -o $(object)
39         ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object)
40
41 mac-bundle:
42         cc -dynamic -c $(source) -o $(object)
43         ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).bundle $(object)
44
45 solaris:
46         cc -KPIC -c $(source) -o $(object)
47         cc -G $(object) -o $(shared_lib)
48
49 aix-acl:
50         gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
51         make_shared -o $(shared_lib) $(object)