Initial release

This commit is contained in:
Pierre Pronchery 2008-04-11 12:57:55 +00:00
parent 6e4a2a6db2
commit c2b6091993
4 changed files with 113 additions and 0 deletions

60
src/target/Makefile Normal file
View File

@ -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

22
src/target/graph.c Normal file
View File

@ -0,0 +1,22 @@
/* $Id$ */
/* Copyright (c) 2008 Pierre Pronchery <khorben@defora.org> */
/* 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 */

9
src/target/project.conf Normal file
View File

@ -0,0 +1,9 @@
targets=graph,sparc64
[graph]
type=library
sources=graph.c
[sparc64]
type=library
sources=sparc64.c

22
src/target/sparc64.c Normal file
View File

@ -0,0 +1,22 @@
/* $Id$ */
/* Copyright (c) 2008 Pierre Pronchery <khorben@defora.org> */
/* 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 */