Support Snow Leopard by generating universal (x86_64,i386) dylib bundles)
[clsql.git] / Makefile.common
1 UNAME=$(shell uname)
2 UNAME_A=$(shell uname -a)
3 DARWIN_LIBC=$(shell file /usr/lib/libc.dylib)
4
5 OS_AIX=$(shell expr "$(UNAME)" : '.*AIX.*')
6 OS_SUNOS=$(shell expr "$(UNAME)" : '.*SunOS.*')
7 OS_DARWIN=$(shell expr "$(UNAME)" : '.*Darwin.*')
8 OS_DARWIN64=$(shell expr "$(DARWIN_LIBC)" : '.*x86_64.*')
9 OS_CYGWIN=$(shell expr "$(UNAME)" : '.*CYGWIN.*')
10 OS_LINUX=$(shell expr "$(UNAME)" : '.*Linux.*')
11 OS_LINUX64=$(shell expr "$(UNAME_A)" : '.*Linux.*x86_64.*')
12
13 all:
14         
15
16 .PHONY: clean
17 clean:
18         @rm -rf .bin
19         @rm -f *.ufsl *.fsl *.fas *.x86f *.sparcf *.fasl  *.pfsl *.dfsl
20         @rm -f *.fasla8 *.fasla16 *.faslm8 *.faslm16 *.faslmt
21         @rm -f *~ *.bak *.orig *.err \#*\# .#*
22         @rm -f *.so *.a
23         @rm -rf debian/cl-sql
24 ifneq ($(SUBDIRS)$(DOCSUBDIRS),)
25         @set -e; for i in $(SUBDIRS) $(DOCSUBDIRS); do \
26                 $(MAKE) -C $$i $@; done
27 endif
28
29 distclean: clean
30 ifneq ($(SUBDIRS)$(DOCSUBDIRS),)
31         @set -e; for i in $(SUBDIRS) $(DOCSUBDIRS); do \
32                 $(MAKE) -C $$i $@; done
33 endif
34
35 .SUFFIXES:            # No default suffixes