r10614: 2005-07-05 Kevin Rosenberg (kevin@rosenberg.net)
[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$
9 #
10 # This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg
11 #
12
13 SUBDIRS:=
14
15 include ../Makefile.common
16
17 .PHONY: distclean
18 distclean: clean
19
20
21 base=c-test-fns
22 source=$(base).c
23 object=$(base).o
24 shared_lib=$(base).so
25
26 .PHONY: all
27 all: $(shared_lib)
28
29 linux: $(source) Makefile
30         gcc -fPIC -DPIC -c $(source) -o $(object)
31         gcc -shared $(object) -o $(shared_lib)
32         rm $(object)
33
34 mac:
35         cc -dynamic -c $(source) -o $(object)
36         ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object)
37         ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib
38
39 solaris:
40         cc -KPIC -c $(source) -o $(object)
41         cc -G $(object) -o $(shared_lib)
42
43 aix-acl:
44         gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source)
45         make_shared -o $(shared_lib) $(object)