Adding versions to the Changelog
[clsql.git] / Makefile.common
index a7f36a2247b5810265ef7b2e53a46844a32adb8d..3c8fd2bb314b131a79943c066a7355adcb493d7f 100644 (file)
@@ -1,10 +1,27 @@
+UNAME=$(shell uname)
+UNAME_A=$(shell uname -a)
+DARWIN_LIBC=$(shell file /usr/lib/libc.dylib)
+
+OS_AIX=$(shell expr "$(UNAME)" : '.*AIX.*')
+OS_SUNOS=$(shell expr "$(UNAME)" : '.*SunOS.*')
+OS_DARWIN=$(shell expr "$(UNAME)" : '.*Darwin.*')
+ifneq ($(OS_DARWIN),0) 
+  OS_DARWIN64=$(shell expr "$(DARWIN_LIBC)" : '.*x86_64.*')
+else
+  OS_DARWIN64=0
+endif
+OS_CYGWIN=$(shell expr "$(UNAME)" : '.*CYGWIN.*')
+OS_LINUX=$(shell expr "$(UNAME)" : '.*Linux.*')
+OS_LINUX64=$(shell expr "$(UNAME_A)" : '.*Linux.*x86_64.*')
+
 all:
        
 
 .PHONY: clean
 clean:
        @rm -rf .bin
-       @rm -f *.ufsl *.fsl *.fas *.x86f *.sparcf *.fasl 
+       @rm -f *.ufsl *.fsl *.fas *.x86f *.sparcf *.fasl  *.pfsl *.dfsl
+       @rm -f *.fasla8 *.fasla16 *.faslm8 *.faslm16 *.faslmt
        @rm -f *~ *.bak *.orig *.err \#*\# .#*
        @rm -f *.so *.a
        @rm -rf debian/cl-sql
@@ -13,4 +30,10 @@ ifneq ($(SUBDIRS)$(DOCSUBDIRS),)
                $(MAKE) -C $$i $@; done
 endif
 
+distclean: clean
+ifneq ($(SUBDIRS)$(DOCSUBDIRS),)
+       @set -e; for i in $(SUBDIRS) $(DOCSUBDIRS); do \
+               $(MAKE) -C $$i $@; done
+endif
+
 .SUFFIXES:            # No default suffixes