Bläddra i källkod

Update copyright for 2015; makefile updates.

master
Ben Kurtovic 9 år sedan
förälder
incheckning
f20535c464
10 ändrade filer med 20 tillägg och 19 borttagningar
  1. +1
    -1
      LICENSE
  2. +2
    -2
      README.md
  3. +1
    -1
      crater.c
  4. +9
    -8
      makefile
  5. +1
    -1
      src/errors.h
  6. +1
    -1
      src/rom.c
  7. +1
    -1
      src/rom.h
  8. +2
    -2
      src/version.h
  9. +1
    -1
      src/z80.c
  10. +1
    -1
      src/z80.h

+ 1
- 1
LICENSE Visa fil

@@ -1,4 +1,4 @@
Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal


+ 2
- 2
README.md Visa fil

@@ -22,8 +22,8 @@ Installing
----------

Only OS X and Linux are tested. You'll need a decent compiler that supports C11
(gcc, clang) and SDL 2. Using Homebrew, you can `brew install sdl2`; using apt,
you can `apt-get install libsdl2-dev`.
(clang preferred) and SDL 2. Using Homebrew, you can `brew install sdl2`; using
apt, you can `apt-get install libsdl2-dev`.

Run `make` to create `./crater`. To build the development version with debug
symbols (they can exist simultaneously), run `make DEBUG=1`, which creates


+ 1
- 1
crater.c Visa fil

@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#include <dirent.h>


+ 9
- 8
makefile Visa fil

@@ -6,36 +6,37 @@ SOURCES = src
BUILD = build
DEVEXT = -dev

CC = gcc
FLAGS = -O2 -Wall -pedantic -std=c11
CC = clang
FLAGS = -O2 -Wall -Wextra -pedantic -std=c11
CFLAGS = $(shell sdl2-config --cflags)
LIBS = $(shell sdl2-config --libs)
MKDIR = mkdir -p
RM = rm -rf

MODE = release
BNRY = $(PROGRAM)
SRCS = $(foreach d,.,$(wildcard *.c)) $(foreach d,$(SOURCES),$(wildcard $(addprefix $(d)/*,.c)))
OBJS = $(patsubst %.c,%.o,$(addprefix $(BUILD)/$(MODE)/,$(SRCS)))
DEPS = $(OBJS:%.o=%.d)
DIRS = $(sort $(dir $(OBJS)))

ifdef DEBUG
PROGRAM := $(PROGRAM)$(DEVEXT)
FLAGS += -g
MODE = debug
BNRY := $(BNRY)$(DEVEXT)
FLAGS += -g -DDEBUG_MODE
MODE = debug
endif

.PHONY: all clean

all: $(PROGRAM)
all: $(BNRY)

clean:
$(RM) $(PROGRAM) $(PROGRAM)$(DEVEXT) $(BUILD)
$(RM) $(BUILD) $(PROGRAM) $(PROGRAM)$(DEVEXT)

$(DIRS):
$(MKDIR) $@

$(PROGRAM): $(OBJS)
$(BNRY): $(OBJS)
$(CC) $(FLAGS) $(LIBS) $(OBJS) -o $@

$(OBJS): | $(DIRS)


+ 1
- 1
src/errors.h Visa fil

@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#pragma once


+ 1
- 1
src/rom.c Visa fil

@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#include <stdio.h>


+ 1
- 1
src/rom.h Visa fil

@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#pragma once


+ 2
- 2
src/version.h Visa fil

@@ -1,6 +1,6 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#pragma once

#define CRATER_VERSION "0.1.dev"
#define CRATER_VERSION "0.1.0-dev"

+ 1
- 1
src/z80.c Visa fil

@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#include "z80.h"

+ 1
- 1
src/z80.h Visa fil

@@ -1,4 +1,4 @@
/* Copyright (C) 2014 Ben Kurtovic <ben.kurtovic@gmail.com>
/* Copyright (C) 2014-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
Released under the terms of the MIT License. See LICENSE for details. */

#pragma once


Laddar…
Avbryt
Spara