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