Added amd64 target

This commit is contained in:
Pierre Pronchery 2008-04-24 17:35:24 +00:00
parent 8601c63095
commit 1d7dd68cd0
4 changed files with 47 additions and 3 deletions

View File

@ -34,6 +34,7 @@ dist:
$(PACKAGE)-$(VERSION)/src/common.h \ $(PACKAGE)-$(VERSION)/src/common.h \
$(PACKAGE)-$(VERSION)/src/tokenset.h \ $(PACKAGE)-$(VERSION)/src/tokenset.h \
$(PACKAGE)-$(VERSION)/src/project.conf \ $(PACKAGE)-$(VERSION)/src/project.conf \
$(PACKAGE)-$(VERSION)/src/target/amd64.c \
$(PACKAGE)-$(VERSION)/src/target/graph.c \ $(PACKAGE)-$(VERSION)/src/target/graph.c \
$(PACKAGE)-$(VERSION)/src/target/sparc64.c \ $(PACKAGE)-$(VERSION)/src/target/sparc64.c \
$(PACKAGE)-$(VERSION)/src/target/project.conf \ $(PACKAGE)-$(VERSION)/src/target/project.conf \

View File

@ -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 PREFIX = /usr/local
DESTDIR = DESTDIR =
LIBDIR = $(PREFIX)/lib LIBDIR = $(PREFIX)/lib
@ -12,6 +12,16 @@ INSTALL = install
all: $(TARGETS) 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_OBJS = graph.o
graph_CFLAGS = $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) graph_CFLAGS = $(CPPFLAGS) $(CFLAGSF) $(CFLAGS)
@ -32,6 +42,9 @@ sparc64.a: $(sparc64_OBJS)
sparc64.so: $(sparc64_OBJS) sparc64.so: $(sparc64_OBJS)
$(LD) -o sparc64.so $(sparc64_OBJS) $(LD) -o sparc64.so $(sparc64_OBJS)
amd64.o: amd64.c
$(CC) $(amd64_CFLAGS) -c amd64.c
graph.o: graph.c graph.o: graph.c
$(CC) $(graph_CFLAGS) -c graph.c $(CC) $(graph_CFLAGS) -c graph.c
@ -39,19 +52,23 @@ sparc64.o: sparc64.c
$(CC) $(sparc64_CFLAGS) -c sparc64.c $(CC) $(sparc64_CFLAGS) -c sparc64.c
clean: clean:
$(RM) $(graph_OBJS) $(sparc64_OBJS) $(RM) $(amd64_OBJS) $(graph_OBJS) $(sparc64_OBJS)
distclean: clean distclean: clean
$(RM) $(TARGETS) $(RM) $(TARGETS)
install: all install: all
$(MKDIR) $(DESTDIR)$(LIBDIR) $(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 0644 graph.a $(DESTDIR)$(LIBDIR)/graph.a
$(INSTALL) -m 0755 graph.so $(DESTDIR)$(LIBDIR)/graph.so $(INSTALL) -m 0755 graph.so $(DESTDIR)$(LIBDIR)/graph.so
$(INSTALL) -m 0644 sparc64.a $(DESTDIR)$(LIBDIR)/sparc64.a $(INSTALL) -m 0644 sparc64.a $(DESTDIR)$(LIBDIR)/sparc64.a
$(INSTALL) -m 0755 sparc64.so $(DESTDIR)$(LIBDIR)/sparc64.so $(INSTALL) -m 0755 sparc64.so $(DESTDIR)$(LIBDIR)/sparc64.so
uninstall: uninstall:
$(RM) $(DESTDIR)$(LIBDIR)/amd64.a
$(RM) $(DESTDIR)$(LIBDIR)/amd64.so
$(RM) $(DESTDIR)$(LIBDIR)/graph.a $(RM) $(DESTDIR)$(LIBDIR)/graph.a
$(RM) $(DESTDIR)$(LIBDIR)/graph.so $(RM) $(DESTDIR)$(LIBDIR)/graph.so
$(RM) $(DESTDIR)$(LIBDIR)/sparc64.a $(RM) $(DESTDIR)$(LIBDIR)/sparc64.a

22
src/target/amd64.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"
/* amd64 */

View File

@ -1,4 +1,8 @@
targets=graph,sparc64 targets=amd64,graph,sparc64
[amd64]
type=library
sources=amd64.c
[graph] [graph]
type=library type=library