From c2b6091993c278400ca021010c967514027700fe Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Fri, 11 Apr 2008 12:57:55 +0000 Subject: [PATCH] Initial release --- src/target/Makefile | 60 +++++++++++++++++++++++++++++++++++++++++ src/target/graph.c | 22 +++++++++++++++ src/target/project.conf | 9 +++++++ src/target/sparc64.c | 22 +++++++++++++++ 4 files changed, 113 insertions(+) create mode 100644 src/target/Makefile create mode 100644 src/target/graph.c create mode 100644 src/target/project.conf create mode 100644 src/target/sparc64.c diff --git a/src/target/Makefile b/src/target/Makefile new file mode 100644 index 0000000..d469df9 --- /dev/null +++ b/src/target/Makefile @@ -0,0 +1,60 @@ +TARGETS = graph.a graph.so sparc64.a sparc64.so +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +AR = ar -rc +RANLIB = ranlib +LD = ld -shared +RM = rm -f +MKDIR = mkdir -p +INSTALL = install + + +all: $(TARGETS) + +graph_OBJS = graph.o +graph_CFLAGS = $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) + +graph.a: $(graph_OBJS) + $(AR) graph.a $(graph_OBJS) + $(RANLIB) graph.a + +graph.so: $(graph_OBJS) + $(LD) -o graph.so $(graph_OBJS) + +sparc64_OBJS = sparc64.o +sparc64_CFLAGS = $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) + +sparc64.a: $(sparc64_OBJS) + $(AR) sparc64.a $(sparc64_OBJS) + $(RANLIB) sparc64.a + +sparc64.so: $(sparc64_OBJS) + $(LD) -o sparc64.so $(sparc64_OBJS) + +graph.o: graph.c + $(CC) $(graph_CFLAGS) -c graph.c + +sparc64.o: sparc64.c + $(CC) $(sparc64_CFLAGS) -c sparc64.c + +clean: + $(RM) $(graph_OBJS) $(sparc64_OBJS) + +distclean: clean + $(RM) $(TARGETS) + +install: all + $(MKDIR) $(DESTDIR)$(LIBDIR) + $(INSTALL) -m 0644 graph.a $(DESTDIR)$(LIBDIR)/graph.a + $(INSTALL) -m 0755 graph.so $(DESTDIR)$(LIBDIR)/graph.so + $(INSTALL) -m 0644 sparc64.a $(DESTDIR)$(LIBDIR)/sparc64.a + $(INSTALL) -m 0755 sparc64.so $(DESTDIR)$(LIBDIR)/sparc64.so + +uninstall: + $(RM) $(DESTDIR)$(LIBDIR)/graph.a + $(RM) $(DESTDIR)$(LIBDIR)/graph.so + $(RM) $(DESTDIR)$(LIBDIR)/sparc64.a + $(RM) $(DESTDIR)$(LIBDIR)/sparc64.so + +.PHONY: all clean distclean install uninstall diff --git a/src/target/graph.c b/src/target/graph.c new file mode 100644 index 0000000..ee65f32 --- /dev/null +++ b/src/target/graph.c @@ -0,0 +1,22 @@ +/* $Id$ */ +/* Copyright (c) 2008 Pierre Pronchery */ +/* This file is part of DeforaOS Devel c99 */ +/* c99 is not free software; you can redistribute it and/or modify it under the + * terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 + * Unported as published by the Creative Commons organization. + * + * c99 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 Creative Commons Attribution-NonCommercial- + * ShareAlike 3.0 Unported license for more details. + * + * You should have received a copy of the Creative Commons Attribution- + * NonCommercial-ShareAlike 3.0 along with c99; if not, browse to + * http://creativecommons.org/licenses/by-nc-sa/3.0/ */ + + + +#include "target.h" + + +/* graph */ diff --git a/src/target/project.conf b/src/target/project.conf new file mode 100644 index 0000000..4fea5bf --- /dev/null +++ b/src/target/project.conf @@ -0,0 +1,9 @@ +targets=graph,sparc64 + +[graph] +type=library +sources=graph.c + +[sparc64] +type=library +sources=sparc64.c diff --git a/src/target/sparc64.c b/src/target/sparc64.c new file mode 100644 index 0000000..2bbf7bd --- /dev/null +++ b/src/target/sparc64.c @@ -0,0 +1,22 @@ +/* $Id$ */ +/* Copyright (c) 2008 Pierre Pronchery */ +/* This file is part of DeforaOS Devel c99 */ +/* c99 is not free software; you can redistribute it and/or modify it under the + * terms of the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 + * Unported as published by the Creative Commons organization. + * + * c99 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 Creative Commons Attribution-NonCommercial- + * ShareAlike 3.0 Unported license for more details. + * + * You should have received a copy of the Creative Commons Attribution- + * NonCommercial-ShareAlike 3.0 along with c99; if not, browse to + * http://creativecommons.org/licenses/by-nc-sa/3.0/ */ + + + +#include "target.h" + + +/* sparc64 */