Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating: rewriting Makefiles to take into account the value of SIZEO…

…F_VOIDP.
  • Loading branch information...
commit 1708c121147a4fe55314a86eca5a777f8efed18d 1 parent d89a73f
Hongwei Xi authored
View
84 libatsdoc/Makefile
@@ -35,97 +35,24 @@
######
ATSHOMEQ="$(ATSHOME)"
-ATSCC=$(ATSHOMEQ)/bin/atscc
-ATSOPT=$(ATSHOMEQ)/bin/atsopt
######
-ATSGCFLAG=
-ATSGCFLAG=-D_ATS_GCATS
-
-ATSCCFLAGS=-g
-ATSCCFLAGS=-g -O
-ATSCCFLAGS=-g -O2
-
-######
-
-ATSLIB=$(ATSHOMEQ)/ccomp/lib
-ATSLIB=$(ATSHOMEQ)/ccomp/lib64
-
-######
-
-all:: libatsdoc clean
+GCC=gcc
######
-SOURCES := \
- libatsdoc_error.sats \
- libatsdoc_error.dats \
- libatsdoc_symbol.sats \
- libatsdoc_symbol.dats \
- libatsdoc_symmap.sats \
- libatsdoc_symmap.dats \
- libatsdoc_filename.sats \
- libatsdoc_filename.dats \
- libatsdoc_location.sats \
- libatsdoc_location.dats \
- libatsdoc_reader.sats \
- libatsdoc_reader.dats \
- libatsdoc_lexbuf.sats \
- libatsdoc_lexbuf.dats \
- libatsdoc_atext.sats \
- libatsdoc_atext.dats \
-
-SOURCESsta := $(filter %.sats, $(SOURCES))
-SOURCESdyn := $(filter %.dats, $(SOURCES))
-
-OBJECTS := $(SOURCES)
-OBJECTS := $(patsubst %.sats, %_sats.o, $(OBJECTS))
-OBJECTS := $(patsubst %.dats, %_dats.o, $(OBJECTS))
+all:: Makefile_out
+all:: ; make -f Makefile_out
+all:: cleanall
######
-libatsdoc_error_sats.o : SATS/libatsdoc_error.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_error_dats.o : DATS/libatsdoc_error.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_symbol_sats.o : SATS/libatsdoc_symbol.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_symbol_dats.o : DATS/libatsdoc_symbol.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_symmap_sats.o : SATS/libatsdoc_symmap.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_symmap_dats.o : DATS/libatsdoc_symmap.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_filename_sats.o : SATS/libatsdoc_filename.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_filename_dats.o : DATS/libatsdoc_filename.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_location_sats.o : SATS/libatsdoc_location.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_location_dats.o : DATS/libatsdoc_location.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_reader_sats.o : SATS/libatsdoc_reader.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_reader_dats.o : DATS/libatsdoc_reader.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_lexbuf_sats.o : SATS/libatsdoc_lexbuf.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_lexbuf_dats.o : DATS/libatsdoc_lexbuf.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_atext_sats.o : SATS/libatsdoc_atext.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
-libatsdoc_atext_dats.o : DATS/libatsdoc_atext.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+Makefile_out: Makefile_inp ; $(GCC) -I $(ATSHOMEQ) -E -P -o $@ -x c $<
######
-libatsdoc: dynloadall.dats $(OBJECTS)
- $(ATSCC) $(ATSCCFLAGS) -c dynloadall.dats
- $(ARR) $(ATSLIB)/libatsdoc.a dynloadall_dats.o $(OBJECTS)
-
-######
-#
-# %_sats.o: %.sats
-# $(ATSCC) $(ATSCCFLAGS) -c $<
-#
-# %_dats.o: %.dats
-# $(ATSCC) $(ATSCCFLAGS) -c $<
-#
-######
-
-ARR=ar -r
-CPF=cp -f
RMF=rm -f
-WCL=wc -l
-
-######
-
-srclines:: ; $(WCL) $(SOURCES)
######
@@ -134,6 +61,7 @@ clean:: ; $(RMF) *_?ats.o
clean:: ; $(RMF) *_?ats.c
cleanall:: clean
+cleanall:: ; $(RMF) Makefile_out
cleanall:: ; $(RMF) libatsdoc.a
###### end of [Makefile] ######
View
89 libatsdoc/Makefile_inp
@@ -0,0 +1,89 @@
+#include "config.h"
+
+/* ****** ******* */
+
+#define __ID(x) x
+
+/* ****** ******* */
+
+ATSHOMEQ="$(ATSHOME)"
+ATSCC=$(ATSHOMEQ)/bin/atscc
+ATSOPT=$(ATSHOMEQ)/bin/atsopt
+
+__ID(######)
+
+ATSGCFLAG=
+ATSGCFLAG=-D_ATS_GCATS
+
+ATSCCFLAGS=-g
+ATSCCFLAGS=-g -O
+ATSCCFLAGS=-g -O2
+
+__ID(######)
+
+#if (SIZEOF_VOIDP==4)
+ATSLIB=$(ATSHOMEQ)/ccomp/lib
+#endif
+#if (SIZEOF_VOIDP==8)
+ATSLIB=$(ATSHOMEQ)/ccomp/lib64
+#endif
+
+__ID(######)
+
+all:: libatsdoc
+
+__ID(######)
+
+SOURCES := \
+ libatsdoc_error.sats \
+ libatsdoc_error.dats \
+ libatsdoc_symbol.sats \
+ libatsdoc_symbol.dats \
+ libatsdoc_symmap.sats \
+ libatsdoc_symmap.dats \
+ libatsdoc_filename.sats \
+ libatsdoc_filename.dats \
+ libatsdoc_location.sats \
+ libatsdoc_location.dats \
+ libatsdoc_reader.sats \
+ libatsdoc_reader.dats \
+ libatsdoc_lexbuf.sats \
+ libatsdoc_lexbuf.dats \
+ libatsdoc_atext.sats \
+ libatsdoc_atext.dats \
+
+SOURCESsta := $(filter %.sats, $(SOURCES))
+SOURCESdyn := $(filter %.dats, $(SOURCES))
+
+OBJECTS := $(SOURCES)
+OBJECTS := $(patsubst %.sats, %_sats.o, $(OBJECTS))
+OBJECTS := $(patsubst %.dats, %_dats.o, $(OBJECTS))
+
+__ID(######)
+
+libatsdoc_error_sats.o : SATS/libatsdoc_error.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_error_dats.o : DATS/libatsdoc_error.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_symbol_sats.o : SATS/libatsdoc_symbol.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_symbol_dats.o : DATS/libatsdoc_symbol.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_symmap_sats.o : SATS/libatsdoc_symmap.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_symmap_dats.o : DATS/libatsdoc_symmap.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_filename_sats.o : SATS/libatsdoc_filename.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_filename_dats.o : DATS/libatsdoc_filename.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_location_sats.o : SATS/libatsdoc_location.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_location_dats.o : DATS/libatsdoc_location.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_reader_sats.o : SATS/libatsdoc_reader.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_reader_dats.o : DATS/libatsdoc_reader.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_lexbuf_sats.o : SATS/libatsdoc_lexbuf.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_lexbuf_dats.o : DATS/libatsdoc_lexbuf.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_atext_sats.o : SATS/libatsdoc_atext.sats; $(ATSCC) $(ATSCCFLAGS) -c $<
+libatsdoc_atext_dats.o : DATS/libatsdoc_atext.dats; $(ATSCC) $(ATSCCFLAGS) -c $<
+
+__ID(######)
+
+ARR=ar -r
+
+__ID(######)
+
+libatsdoc: dynloadall.dats $(OBJECTS); $(ATSCC) $(ATSCCFLAGS) -c dynloadall.dats; $(ARR) $(ATSLIB)/libatsdoc.a dynloadall_dats.o $(OBJECTS)
+
+__ID(###### end of [Makefile] ######)
View
93 libatsyntax/Makefile
@@ -1,85 +1,54 @@
-#########################################################################
-# #
-# Applied Type System #
-# #
-# Hongwei Xi #
-# #
-#########################################################################
+#######################################################################
+# #
+# Applied Type System #
+# #
+# Hongwei Xi #
+# #
+#######################################################################
#
-# ATS - Unleashing the Power of Types!
+# ATS/Postiats - Unleashing the Potential of Types!
+# Copyright (C) 2011-20?? Hongwei Xi, ATS Trustworthy Software
+# All rights reserved
#
-# Copyright (C) 2002-2007 Hongwei Xi.
-#
-# ATS is free software; you can redistribute it and/or modify it under
-# the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by the
-# Free Software Foundation; either version 2.1, or (at your option) any
-# later version.
+# ATS is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 2.1, or (at your option) any later
+# version.
#
-# ATS is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# for more details.
+# ATS is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
#
-# You should have received a copy of the GNU General Public License
-# along with ATS; see the file COPYING. If not, write to the Free
-# Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
-# 02110-1301, USA.
+# You should have received a copy of the GNU General Public License
+# along with ATS; see the file COPYING. If not, please write to the
+# Free Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
#
######
-
#
# Author: Hongwei Xi (hwxi AT cs DOT bu DOT edu)
+# Start Time: July, 2012
#
-
######
ATSHOMEQ="$(ATSHOME)"
-ATSCC=$(ATSHOMEQ)/bin/atscc
-ATSCCFLAGS=
-ATSRUNTIME=$(ATSHOMEQ)/ccomp/runtime
-IATS=-IATS $(ATSHOMEQ)/src
-
-CCFLAGS=-fPIC -O2
-INCLUDES=-I$(ATSHOMEQ)
-
-######
-
-SOURCES = \
- atsyntax_util.sats \
- atsyntax_util.dats \
-
-OBJECTS := $(patsubst %.sats, %_sats.o, $(SOURCES))
-OBJECTS := $(patsubst %.dats, %_dats.o, $(OBJECTS))
######
-ATSLIB=$(ATSHOMEQ)/ccomp/lib
-ATSLIB=$(ATSHOMEQ)/ccomp/lib64
+GCC=gcc
######
-all:: libatsyntax
+all:: Makefile_out
+all:: ; make -f Makefile_out
all:: cleanall
######
-libatsyntax: $(OBJECTS)
- $(ATSCC) -fPIC -shared -o $(ATSLIB)/libatsyntax.so -Wl,-soname,libatsyntax.so `ar t libatsyntax.a`
-
-######
-
-AR=ar
-
-######
-
-atsyntax_util_sats.o: atsyntax_util.sats
- $(ATSCC) $(IATS) $(CCFLAGS) -c atsyntax_util.sats
- $(AR) -r libatsyntax.a $@
-atsyntax_util_dats.o: atsyntax_util.dats
- $(ATSCC) $(IATS) $(CCFLAGS) -c atsyntax_util.dats
- $(AR) -r libatsyntax.a $@
+Makefile_out: Makefile_inp ; $(GCC) -I $(ATSHOMEQ) -E -P -o $@ -x c $<
######
@@ -87,12 +56,12 @@ RMF=rm -f
######
-clean::
- $(RMF) *~
- $(RMF) *_?ats.c *_?ats.o
+clean:: ; $(RMF) *~
+clean:: ; $(RMF) *_?ats.c *_?ats.o
cleanall:: clean
- $(RMF) libatsyntax.a
+cleanall:: ; $(RMF) Makefile_out
+cleanall:: ; $(RMF) libatsyntax.a
distclean:: cleanall
View
55 libatsyntax/Makefile_inp
@@ -0,0 +1,55 @@
+#include "config.h"
+
+/* ****** ******* */
+
+#define __ID(x) x
+
+/* ****** ******* */
+
+ATSHOMEQ="$(ATSHOME)"
+ATSCC=$(ATSHOMEQ)/bin/atscc
+ATSCCFLAGS=
+ATSRUNTIME=$(ATSHOMEQ)/ccomp/runtime
+IATS=-IATS $(ATSHOMEQ)/src
+
+CCFLAGS=-fPIC -O2
+INCLUDES=-I$(ATSHOMEQ)
+
+__ID(######)
+
+SOURCES = \
+ atsyntax_util.sats \
+ atsyntax_util.dats \
+
+OBJECTS := $(patsubst %.sats, %_sats.o, $(SOURCES))
+OBJECTS := $(patsubst %.dats, %_dats.o, $(OBJECTS))
+
+__ID(######)
+
+#if (SIZEOF_VOIDP==4)
+ATSLIB=$(ATSHOMEQ)/ccomp/lib
+#endif
+#if (SIZEOF_VOIDP==8)
+ATSLIB=$(ATSHOMEQ)/ccomp/lib64
+#endif
+
+__ID(######)
+
+all:: libatsyntax
+
+__ID(######)
+
+libatsyntax: $(OBJECTS) ; $(ATSCC) -fPIC -shared -o $(ATSLIB)/libatsyntax.so -Wl,-soname,libatsyntax.so `ar t libatsyntax.a`
+
+__ID(######)
+
+AR=ar
+
+__ID(######)
+
+atsyntax_util_sats.o: atsyntax_util.sats ; $(ATSCC) $(IATS) $(CCFLAGS) -c $< ; $(AR) -r libatsyntax.a $@
+atsyntax_util_dats.o: atsyntax_util.dats ; $(ATSCC) $(IATS) $(CCFLAGS) -c $< ; $(AR) -r libatsyntax.a $@
+
+__ID(######)
+
+__ID(###### end of [Makefile] ######)
Please sign in to comment.
Something went wrong with that request. Please try again.