From f20535c4642479502311dbd2cdeae72b507b7c36 Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Wed, 18 Mar 2015 13:22:32 -0500 Subject: [PATCH] Update copyright for 2015; makefile updates. --- LICENSE | 2 +- README.md | 4 ++-- crater.c | 2 +- makefile | 17 +++++++++-------- src/errors.h | 2 +- src/rom.c | 2 +- src/rom.h | 2 +- src/version.h | 4 ++-- src/z80.c | 2 +- src/z80.h | 2 +- 10 files changed, 20 insertions(+), 19 deletions(-) diff --git a/LICENSE b/LICENSE index 6430de5..0764864 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (C) 2014 Ben Kurtovic +Copyright (C) 2014-2015 Ben Kurtovic Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index aa6e87a..1d70d20 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/crater.c b/crater.c index d26442b..b262d28 100644 --- a/crater.c +++ b/crater.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ #include diff --git a/makefile b/makefile index cefea9c..1db52d4 100644 --- a/makefile +++ b/makefile @@ -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) diff --git a/src/errors.h b/src/errors.h index aacea74..8287b16 100644 --- a/src/errors.h +++ b/src/errors.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ #pragma once diff --git a/src/rom.c b/src/rom.c index 2621d29..0cd5dd3 100644 --- a/src/rom.c +++ b/src/rom.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ #include diff --git a/src/rom.h b/src/rom.h index a28f9c4..b022ac0 100644 --- a/src/rom.h +++ b/src/rom.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ #pragma once diff --git a/src/version.h b/src/version.h index aa85b52..d68f8c4 100644 --- a/src/version.h +++ b/src/version.h @@ -1,6 +1,6 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic 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" diff --git a/src/z80.c b/src/z80.c index 6e05461..b837eb0 100644 --- a/src/z80.c +++ b/src/z80.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ #include "z80.h" diff --git a/src/z80.h b/src/z80.h index 020cf1f..8dff618 100644 --- a/src/z80.h +++ b/src/z80.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2014 Ben Kurtovic +/* Copyright (C) 2014-2015 Ben Kurtovic Released under the terms of the MIT License. See LICENSE for details. */ #pragma once