Changeset d3b7937 for src/libcfa


Ignore:
Timestamp:
Jan 29, 2016, 4:36:39 PM (10 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
ae8b942
Parents:
f3fc8cbe
Message:

building runtime library (first attempt)

Location:
src/libcfa
Files:
3 added
2 edited
18 moved

Legend:

Unmodified
Added
Removed
  • src/libcfa/Makefile.am

    rf3fc8cbe rd3b7937  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Wed Dec 16 22:58:17 2015
    14 ## Update Count     : 9
     13## Last Modified On : Fri Jan 29 11:39:09 2016
     14## Update Count     : 108
    1515###############################################################################
    1616
    17 libcfa_a_SOURCES = libcfa-prelude.c
    1817lib_LIBRARIES = libcfa.a
    1918
     
    4140prototypes.awk :
    4241
    43 MAINTAINERCLEANFILES = ${srcdir}/libcfa-prelude.c
     42MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} ${addprefix ${libdir}/,${lib_LIBRARIES}}
     43
     44#--------------------------------------------------
    4445
    4546libcfa-prelude.c : ${srcdir}/prelude.cf
    46         ../cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     47        ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    4748
    4849libcfa-prelude.o : libcfa-prelude.c
    49         ${BACKEND_CC} -c -o $@ $<
     50        @BACKEND_CC@ -c -o $@ $<
     51
     52CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
     53CC = ${abs_top_srcdir}/src/driver/cfa
     54
     55# extension-less header files are overridden by default make rules => explicitly override rule
     56% : %.c
     57        true
     58
     59libs = algorithm iostream fstream iterator
     60libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
     61
     62cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
     63cfaheaders = limits
     64include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
     65
     66MAINTAINERCLEANFILES += ${includedir}/*
  • src/libcfa/Makefile.in

    rf3fc8cbe rd3b7937  
    1818######################## -*- Mode: Makefile-Automake -*- ######################
    1919###############################################################################
     20
    2021
    2122
     
    3839POST_UNINSTALL = :
    3940subdir = src/libcfa
    40 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
     41DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \
     42        $(srcdir)/Makefile.in
    4143ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
    4244am__aclocal_m4_deps = $(top_srcdir)/configure.ac
     
    7476         $(am__cd) "$$dir" && rm -f $$files; }; \
    7577  }
    76 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)"
     78am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" \
     79        "$(DESTDIR)$(includedir)"
    7780LIBRARIES = $(lib_LIBRARIES)
    7881AR = ar
     
    8083libcfa_a_AR = $(AR) $(ARFLAGS)
    8184libcfa_a_LIBADD =
    82 am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT)
     85am__objects_1 = algorithm.$(OBJEXT) iostream.$(OBJEXT) \
     86        fstream.$(OBJEXT) iterator.$(OBJEXT)
     87am_libcfa_a_OBJECTS = libcfa-prelude.$(OBJEXT) $(am__objects_1)
    8388libcfa_a_OBJECTS = $(am_libcfa_a_OBJECTS)
    8489DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
     
    9398DIST_SOURCES = $(libcfa_a_SOURCES)
    9499DATA = $(cfalib_DATA)
     100HEADERS = $(include_HEADERS)
    95101ETAGS = etags
    96102CTAGS = ctags
     
    104110AWK = @AWK@
    105111BACKEND_CC = @BACKEND_CC@
    106 CC = @CC@
     112CC = ${abs_top_srcdir}/src/driver/cfa
    107113CCDEPMODE = @CCDEPMODE@
    108114CFA_BINDIR = @CFA_BINDIR@
     
    110116CFA_LIBDIR = @CFA_LIBDIR@
    111117CFA_PREFIX = @CFA_PREFIX@
    112 CFLAGS = @CFLAGS@
     118CFLAGS = -g -Wall -Wno-unused-function -B${abs_top_srcdir}/src/driver -XCFA -t  # TEMPORARY: does not build with -O2
    113119CPP = @CPP@
    114120CPPFLAGS = @CPPFLAGS@
     
    200206top_builddir = @top_builddir@
    201207top_srcdir = @top_srcdir@
    202 libcfa_a_SOURCES = libcfa-prelude.c
    203208lib_LIBRARIES = libcfa.a
    204209
     
    206211cfalibdir = ${libdir}
    207212cfalib_DATA = prelude.cf builtins.cf
    208 MAINTAINERCLEANFILES = ${srcdir}/libcfa-prelude.c
     213MAINTAINERCLEANFILES = ${addprefix ${libdir}/,${cfalib_DATA}} \
     214        ${addprefix ${libdir}/,${lib_LIBRARIES}} ${includedir}/*
     215libs = algorithm iostream fstream iterator
     216libcfa_a_SOURCES = libcfa-prelude.c ${libs:=.c}
     217cheaders = bfd bfdlink demangle dialog evdns evhttp evrpc expat fcntl form gcrypt math
     218cfaheaders = limits
     219include_HEADERS = ${cheaders:=.h} ${libs} ${cfaheaders}
    209220all: all-am
    210221
     
    220231          esac; \
    221232        done; \
    222         echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/libcfa/Makefile'; \
     233        echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/libcfa/Makefile'; \
    223234        $(am__cd) $(top_srcdir) && \
    224           $(AUTOMAKE) --foreign src/libcfa/Makefile
     235          $(AUTOMAKE) --gnu src/libcfa/Makefile
    225236.PRECIOUS: Makefile
    226237Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
     
    282293        -rm -f *.tab.c
    283294
     295@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/algorithm.Po@am__quote@
     296@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstream.Po@am__quote@
     297@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iostream.Po@am__quote@
     298@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iterator.Po@am__quote@
    284299@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcfa-prelude.Po@am__quote@
    285300
     
    315330        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
    316331        dir='$(DESTDIR)$(cfalibdir)'; $(am__uninstall_files_from_dir)
     332install-includeHEADERS: $(include_HEADERS)
     333        @$(NORMAL_INSTALL)
     334        test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
     335        @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
     336        for p in $$list; do \
     337          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
     338          echo "$$d$$p"; \
     339        done | $(am__base_list) | \
     340        while read files; do \
     341          echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
     342          $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
     343        done
     344
     345uninstall-includeHEADERS:
     346        @$(NORMAL_UNINSTALL)
     347        @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
     348        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
     349        dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir)
    317350
    318351ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
     
    400433check-am: all-am
    401434check: check-am
    402 all-am: Makefile $(LIBRARIES) $(DATA)
     435all-am: Makefile $(LIBRARIES) $(DATA) $(HEADERS)
    403436installdirs:
    404         for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)"; do \
     437        for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(cfalibdir)" "$(DESTDIR)$(includedir)"; do \
    405438          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
    406439        done
     
    458491info-am:
    459492
    460 install-data-am: install-cfalibDATA
     493install-data-am: install-cfalibDATA install-includeHEADERS
    461494
    462495install-dvi: install-dvi-am
     
    503536ps-am:
    504537
    505 uninstall-am: uninstall-cfalibDATA uninstall-libLIBRARIES
     538uninstall-am: uninstall-cfalibDATA uninstall-includeHEADERS \
     539        uninstall-libLIBRARIES
    506540
    507541.MAKE: install-am install-strip
     
    513547        install-data install-data-am install-dvi install-dvi-am \
    514548        install-exec install-exec-am install-html install-html-am \
    515         install-info install-info-am install-libLIBRARIES install-man \
    516         install-pdf install-pdf-am install-ps install-ps-am \
    517         install-strip installcheck installcheck-am installdirs \
    518         maintainer-clean maintainer-clean-generic mostlyclean \
    519         mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
    520         tags uninstall uninstall-am uninstall-cfalibDATA \
     549        install-includeHEADERS install-info install-info-am \
     550        install-libLIBRARIES install-man install-pdf install-pdf-am \
     551        install-ps install-ps-am install-strip installcheck \
     552        installcheck-am installdirs maintainer-clean \
     553        maintainer-clean-generic mostlyclean mostlyclean-compile \
     554        mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
     555        uninstall-am uninstall-cfalibDATA uninstall-includeHEADERS \
    521556        uninstall-libLIBRARIES
    522557
     
    541576prototypes.awk :
    542577
     578#--------------------------------------------------
     579
    543580libcfa-prelude.c : ${srcdir}/prelude.cf
    544         ../cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
     581        ${abs_top_srcdir}/src/driver/cfa-cpp -l ${srcdir}/prelude.cf $@  # use src/cfa-cpp as not in lib until after install
    545582
    546583libcfa-prelude.o : libcfa-prelude.c
    547         ${BACKEND_CC} -c -o $@ $<
     584        @BACKEND_CC@ -c -o $@ $<
     585
     586# extension-less header files are overridden by default make rules => explicitly override rule
     587% : %.c
     588        true
    548589
    549590# Tell versions [3.59,3.63) of GNU make to not export all variables.
  • src/libcfa/fstream

    rf3fc8cbe rd3b7937  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // fstream.h --
     7// fstream --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Wed May 27 18:13:08 2015
    13 // Update Count     : 1
     12// Last Modified On : Wed Jan 27 23:47:41 2016
     13// Update Count     : 3
    1414//
    1515
     
    1717#define __FSTREAM_H__
    1818
    19 #include "iostream.h"
     19#include "iostream"
    2020
    2121typedef struct ofstream ofstream;
     
    4444
    4545// Local Variables: //
     46// mode: c //
    4647// tab-width: 4 //
    47 // compile-command: "cfa fstream.c" //
    4848// End: //
  • src/libcfa/fstream.c

    rf3fc8cbe rd3b7937  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 22:43:31 2015
    13 // Update Count     : 4
     12// Last Modified On : Tue Jan 26 17:12:59 2016
     13// Update Count     : 6
    1414//
    1515
    16 #include "fstream.h"
     16#include "fstream"
    1717
    1818extern "C" {
  • src/libcfa/iostream

    rf3fc8cbe rd3b7937  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // iostream.h --
     7// iostream --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  4 09:02:11 2016
    13 // Update Count     : 20
     12// Last Modified On : Fri Jan 29 15:50:36 2016
     13// Update Count     : 29
    1414//
    1515
     
    1717#define IOSTREAM_H
    1818
    19 #include "iterator.h"
     19#include "iterator"
    2020
    2121typedef unsigned long streamsize_type;
     
    3939forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long int );
    4040forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, unsigned long long int );
     41forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float ); // FIX ME: should not be required
    4142forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double );
    4243forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double );
     44forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, float _Complex );
     45forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, double _Complex );
     46forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, long double _Complex );
    4347forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const char * );
    4448forall( dtype ostype | ostream( ostype ) ) ostype * ?|?( ostype *, const void * );
     
    8084
    8185// Local Variables: //
     86// mode: c //
    8287// tab-width: 4 //
    83 // compile-command: "cfa iostream.c" //
    8488// End: //
  • src/libcfa/iostream.c

    rf3fc8cbe rd3b7937  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Mon Jan  4 09:38:58 2016
    13 // Update Count     : 37
     12// Last Modified On : Fri Jan 29 15:38:34 2016
     13// Update Count     : 47
    1414//
    1515
    16 #include "iostream.h"
     16#include "iostream"
     17
    1718extern "C" {
    1819#include <stdio.h>
    1920#include <string.h>                                                                             // strlen
     21#include <complex.h>                                                                    // creal, cimag
    2022}
    2123
     
    6264
    6365forall( dtype ostype | ostream( ostype ) )
     66ostype * ?|?( ostype *os, float f ) {
     67        char buffer[32];
     68        return write( os, buffer, sprintf( buffer, "%g", f ) );
     69} // ?|?
     70
     71forall( dtype ostype | ostream( ostype ) )
    6472ostype * ?|?( ostype *os, double d ) {
    6573        char buffer[32];
     
    7179        char buffer[32];
    7280        return write( os, buffer, sprintf( buffer, "%Lg", d ) );
     81} // ?|?
     82
     83forall( dtype ostype | ostream( ostype ) )
     84ostype * ?|?( ostype *os, float _Complex c ) {
     85        char buffer[64];
     86        return write( os, buffer, sprintf( buffer, "%g+i%g", crealf( c ), cimagf( c ) ) );
     87} // ?|?
     88
     89forall( dtype ostype | ostream( ostype ) )
     90ostype * ?|?( ostype *os, double _Complex c ) {
     91        char buffer[64];
     92        return write( os, buffer, sprintf( buffer, "%g+i%g", creal( c ), cimag( c ) ) );
     93} // ?|?
     94
     95forall( dtype ostype | ostream( ostype ) )
     96ostype * ?|?( ostype *os, long double _Complex c ) {
     97        char buffer[64];
     98        return write( os, buffer, sprintf( buffer, "%Lg+i%Lg", creall( c ), cimagl( c ) ) );
    7399} // ?|?
    74100
  • src/libcfa/iterator

    rf3fc8cbe rd3b7937  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // iterator.h --
     7// iterator --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 17:58:28 2015
    13 // Update Count     : 6
     12// Last Modified On : Wed Jan 27 23:49:13 2016
     13// Update Count     : 7
    1414//
    1515
     
    4747
    4848// Local Variables: //
     49// mode: c //
    4950// tab-width: 4 //
    50 // compile-command: "cfa iterator.c" //
    5151// End: //
  • src/libcfa/iterator.c

    rf3fc8cbe rd3b7937  
    1010// Created On       : Wed May 27 17:56:53 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Nov 19 17:54:37 2015
    13 // Update Count     : 24
     12// Last Modified On : Tue Jan 26 17:16:07 2016
     13// Update Count     : 26
    1414//
    1515
    16 #include "iterator.h"
     16#include "iterator"
    1717
    1818forall( type iterator_type, type elt_type | iterator( iterator_type, elt_type ) )
Note: See TracChangeset for help on using the changeset viewer.