Skip to content

Commit

Permalink
Jaguar sources: initial import.
Browse files Browse the repository at this point in the history
git-svn-id: svn://obiwan/Jaguar@1 1d14b586-ad98-11dc-b037-dddde97c3f5c
  • Loading branch information
sbriais committed Dec 18, 2007
0 parents commit 7aad83d
Show file tree
Hide file tree
Showing 157 changed files with 23,115 additions and 0 deletions.
504 changes: 504 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

100 changes: 100 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
JAGPATH=$(HOME)/Jaguar
CROSSPATH=/usr/local/m68k-aout/m68k-aout
MADMAC=$(JAGPATH)/bin/mac
CC=$(CROSSPATH)/bin/gcc
AR=$(CROSSPATH)/bin/ar

MACFLAGS=-fb -v
CFLAGS=-mc68000 -Wall -fomit-frame-pointer -O2 -msoft-float
SRCS=
SRCC=
SRCH=
OBJS=$(SRCC:.c=.o) $(SRCS:.s=.o)
NASUBDIRS=interrupt display collision fb2d sound
ASUBDIRS=sprite screen joypad blit memalign console
OSUBDIRS=doc
SUBDIRS=$(NASUBDIRS) $(ASUBDIRS) $(OSUBDIRS)

PROJECT=rmvlib
# also change in Doxyfile!!!
PROJECT_NUMBER=1.1.3

TARFILE=$(PROJECT)-$(PROJECT_NUMBER).tar

DISTFILES=Makefile main.h jaguar.inc LICENSE build.sh

INSTALLH=
INSTALLLIB=$(PROJECT).a

TARGET=$(HOME)/tmp/rmvlib

all: subdirs $(OBJS) $(PROJECT).a

$(PROJECT).a: Makefile subdirs $(OBJS)
for dir in $(ASUBDIRS); do $(AR) rvs $(PROJECT).a $$dir/*.o; done

.PHONY: subdirs $(SUBDIRS)

subdirs: $(SUBDIRS)

$(SUBDIRS):
$(MAKE) -C $@

%.o: %.s
$(MADMAC) $(MACFLAGS) $<

%.o: %.c
$(CC) $(CFLAGS) -c $<

clean:
for dir in $(SUBDIRS); do $(MAKE) clean -C $$dir; done
rm -f *~ $(OBJS) $(PROJECT).a

dist:
tar cfv $(TARFILE) $(DISTFILES); \
for dir in $(SUBDIRS); do \
for file in `$(MAKE) -s dist-files -C $$dir`; do \
tar rfv $(TARFILE) "$$dir/$$file"; \
done; \
done;
gzip $(TARFILE)

list-headers:
for file in $(INSTALLH); do \
echo "$$file"; \
done; \
for dir in $(SUBDIRS); do \
for file in `$(MAKE) -s install-h -C $$dir`; do \
echo "$$dir/$$file"; \
done; \
done

list-objects:
for file in $(INSTALLLIB); do \
echo "$$file"; \
done; \
for dir in $(SUBDIRS); do \
for file in `$(MAKE) -s install-lib -C $$dir`; do \
echo "$$dir/$$file"; \
done; \
done

install:
mkdir -p "$(TARGET)/include"; \
mkdir -p "$(TARGET)/lib"; \
for file in $(INSTALLH); do \
install -m "u+rw,go+r" "$$file" "$(TARGET)/include"; \
done; \
for dir in $(SUBDIRS); do \
for file in `$(MAKE) -s install-h -C $$dir`; do \
install -m "u+rw,go+r" "$$dir/$$file" "$(TARGET)/include"; \
done; \
done; \
for file in $(INSTALLLIB); do \
install -m "u+rw,go+r" "$$file" "$(TARGET)/lib"; \
done; \
for dir in $(SUBDIRS); do \
for file in `$(MAKE) -s install-lib -C $$dir`; do \
install -m "u+rw,go+r" "$$dir/$$file" "$(TARGET)/lib"; \
done; \
done
43 changes: 43 additions & 0 deletions blit/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
JAGPATH=$(HOME)/Jaguar
CROSSPATH=/usr/local/m68k-aout/m68k-aout
MADMAC=$(JAGPATH)/bin/mac
CC=$(CROSSPATH)/bin/gcc
AR=$(CROSSPATH)/bin/ar

MACFLAGS=-fb -v
CFLAGS=-mc68000 -Wall -fomit-frame-pointer -O2 -msoft-float

SRCC=
SRCS=blitset.s blitmove.s
SRCH=blit.h
OBJS=$(SRCC:.c=.o) $(SRCS:.s=.o)

DISTFILES=Makefile $(SRCC) $(SRCH) $(SRCS) jaguar.inc
INSTALLH=blit.h
INSTALLLIB=

# all: .depend $(OBJS)
all: $(OBJS)

%.o: %.s
$(MADMAC) $(MACFLAGS) $<

%.o: %.c
$(CC) $(CFLAGS) -c $<

clean:
rm -f *~ $(OBJS) .depend

dist-files:
@echo $(DISTFILES)

install-h:
@echo $(INSTALLH)

install-lib:
@echo $(INSTALLLIB)

# .depend: $(SRCC)
# $(CC) -MM $(SRCC) > .depend

# -include .depend
45 changes: 45 additions & 0 deletions blit/blit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/* The Removers'Library */
/* Copyright (C) 2006 Seb/The Removers */
/* http://removers.atari.org/ */

/* This library is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Lesser General Public */
/* License as published by the Free Software Foundation; either */
/* version 2.1 of the License, or (at your option) any later version. */

/* This library 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 GNU */
/* Lesser General Public License for more details. */

/* You should have received a copy of the GNU Lesser General Public */
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */

/** \file blit.h
* \brief Functions that uses the blitter to set or move buffers.
*/
#ifndef _BLIT_H
#define _BLIT_H

#include <stddef.h>

/** Set the n bytes of the buffer starting at dst with character c. */
void *blitset(/** Buffer address */
void *dst,
/** Byte to be used to fill the buffer */
int c,
/** Number of bytes to set */
size_t n);

/** Move a number of bytes from src buffer to dst buffer.
* The two buffers may overlap in memory.
*/
void *blitmove(/** Address of the source buffer */
void *src,
/** Address of the target buffer */
void *dst,
/** Number of bytes to move */
size_t n);

#endif
Loading

0 comments on commit 7aad83d

Please sign in to comment.