Browse Source

Update copyright for 2015; makefile updates.

master
Ben Kurtovic 9 years ago
parent
commit
f20535c464
10 changed files with 20 additions and 19 deletions
  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 View File

@@ -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 Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal


+ 2
- 2
README.md View File

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


Only OS X and Linux are tested. You'll need a decent compiler that supports C11 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 Run `make` to create `./crater`. To build the development version with debug
symbols (they can exist simultaneously), run `make DEBUG=1`, which creates symbols (they can exist simultaneously), run `make DEBUG=1`, which creates


+ 1
- 1
crater.c View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#include <dirent.h> #include <dirent.h>


+ 9
- 8
makefile View File

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


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


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


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


.PHONY: all clean .PHONY: all clean


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


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


$(DIRS): $(DIRS):
$(MKDIR) $@ $(MKDIR) $@


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


$(OBJS): | $(DIRS) $(OBJS): | $(DIRS)


+ 1
- 1
src/errors.h View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#pragma once #pragma once


+ 1
- 1
src/rom.c View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#include <stdio.h> #include <stdio.h>


+ 1
- 1
src/rom.h View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#pragma once #pragma once


+ 2
- 2
src/version.h View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#pragma once #pragma once


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

+ 1
- 1
src/z80.c View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#include "z80.h" #include "z80.h"

+ 1
- 1
src/z80.h View File

@@ -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. */ Released under the terms of the MIT License. See LICENSE for details. */


#pragma once #pragma once


Loading…
Cancel
Save