diff --git a/Makefile b/Makefile index b145fdd..96e2582 100644 --- a/Makefile +++ b/Makefile @@ -34,6 +34,7 @@ dist: $(PACKAGE)-$(VERSION)/src/common.h \ $(PACKAGE)-$(VERSION)/src/tokenset.h \ $(PACKAGE)-$(VERSION)/src/project.conf \ + $(PACKAGE)-$(VERSION)/src/target/amd64.c \ $(PACKAGE)-$(VERSION)/src/target/graph.c \ $(PACKAGE)-$(VERSION)/src/target/sparc64.c \ $(PACKAGE)-$(VERSION)/src/target/project.conf \ diff --git a/src/target/Makefile b/src/target/Makefile index d469df9..43c4b88 100644 --- a/src/target/Makefile +++ b/src/target/Makefile @@ -1,4 +1,4 @@ -TARGETS = graph.a graph.so sparc64.a sparc64.so +TARGETS = amd64.a amd64.so graph.a graph.so sparc64.a sparc64.so PREFIX = /usr/local DESTDIR = LIBDIR = $(PREFIX)/lib @@ -12,6 +12,16 @@ INSTALL = install all: $(TARGETS) +amd64_OBJS = amd64.o +amd64_CFLAGS = $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) + +amd64.a: $(amd64_OBJS) + $(AR) amd64.a $(amd64_OBJS) + $(RANLIB) amd64.a + +amd64.so: $(amd64_OBJS) + $(LD) -o amd64.so $(amd64_OBJS) + graph_OBJS = graph.o graph_CFLAGS = $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) @@ -32,6 +42,9 @@ sparc64.a: $(sparc64_OBJS) sparc64.so: $(sparc64_OBJS) $(LD) -o sparc64.so $(sparc64_OBJS) +amd64.o: amd64.c + $(CC) $(amd64_CFLAGS) -c amd64.c + graph.o: graph.c $(CC) $(graph_CFLAGS) -c graph.c @@ -39,19 +52,23 @@ sparc64.o: sparc64.c $(CC) $(sparc64_CFLAGS) -c sparc64.c clean: - $(RM) $(graph_OBJS) $(sparc64_OBJS) + $(RM) $(amd64_OBJS) $(graph_OBJS) $(sparc64_OBJS) distclean: clean $(RM) $(TARGETS) install: all $(MKDIR) $(DESTDIR)$(LIBDIR) + $(INSTALL) -m 0644 amd64.a $(DESTDIR)$(LIBDIR)/amd64.a + $(INSTALL) -m 0755 amd64.so $(DESTDIR)$(LIBDIR)/amd64.so $(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)/amd64.a + $(RM) $(DESTDIR)$(LIBDIR)/amd64.so $(RM) $(DESTDIR)$(LIBDIR)/graph.a $(RM) $(DESTDIR)$(LIBDIR)/graph.so $(RM) $(DESTDIR)$(LIBDIR)/sparc64.a diff --git a/src/target/amd64.c b/src/target/amd64.c new file mode 100644 index 0000000..fc52591 --- /dev/null +++ b/src/target/amd64.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" + + +/* amd64 */ diff --git a/src/target/project.conf b/src/target/project.conf index 4fea5bf..a87a585 100644 --- a/src/target/project.conf +++ b/src/target/project.conf @@ -1,4 +1,8 @@ -targets=graph,sparc64 +targets=amd64,graph,sparc64 + +[amd64] +type=library +sources=amd64.c [graph] type=library