Selaa lähdekoodia

Initial commit

Dan ELKOUBY 11 vuotta sitten
commit
301b951611
4 muutettua tiedostoa jossa 84 lisäystä ja 0 poistoa
  1. 7 0
      .gitignore
  2. 22 0
      LICENSE
  3. 51 0
      Makefile
  4. 4 0
      README.md

+ 7 - 0
.gitignore

@@ -0,0 +1,7 @@
+*.o
+*.tns
+bin
+*.h
+*.elf
+*.gdb
+

+ 22 - 0
LICENSE

@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 The Pokespire Team
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+

+ 51 - 0
Makefile

@@ -0,0 +1,51 @@
+DEBUG = FALSE
+GCC = nspire-gcc
+GCCFLAGS = -Wall -W -marm
+ifeq ($(DEBUG),FALSE)
+	GCCFLAGS += -Os
+else
+	GCCFLAGS += -O0 -g
+	LDFLAGS += --debug
+endif
+
+AS = nspire-as
+GXX = nspire-g++
+
+LD = nspire-ld-bflt
+LDFLAGS =
+CPPOBJS = $(patsubst %.cpp,%.o,$(wildcard *.cpp))
+OBJS = $(patsubst %.c,%.o,$(wildcard *.c)) $(patsubst %.S,%.o,$(wildcard *.S)) $(CPPOBJS)
+ifneq ($(strip $(CPPOBJS)),)
+	LDFLAGS += --cpp
+endif
+
+SOURCES = $(wildcard *.c) $(wildcard *.S) $(wildcard *.cpp)
+
+EXE = pokespire.tns
+DISTDIR = bin
+vpath %.tns $(DISTDIR)
+
+all: $(EXE)
+
+%.o: %.c headers
+	$(GCC) $(GCCFLAGS) -c $<
+
+%.o: %.cpp headers
+	$(GXX) $(GCCFLAGS) -c $<
+
+%.o: %.S headers
+	$(AS) -c $<
+
+headers:
+	makeheaders $(SOURCES)
+
+$(EXE): $(OBJS)
+	mkdir -p $(DISTDIR)
+	$(LD) $^ -o $(DISTDIR)/$@ $(LDFLAGS)
+ifeq ($(DEBUG),FALSE)
+	@rm -f $(DISTDIR)/*.gdb
+endif
+
+clean:
+	rm -f *.h *.o *.elf $(DISTDIR)/*.gdb $(DISTDIR)/$(EXE)
+

+ 4 - 0
README.md

@@ -0,0 +1,4 @@
+# Pokespire
+
+A Pokémon clone for the TI-Nspire. There's still a lot of work before anything works.
+