blob: c31e565e8198d04f1993f539d82cc786c8288b2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
CC = /usr/bin/g++
CFLAGS = -Wall -g -std=c++11 -Werror=missing-prototypes
LDFLAGS =
OUTPUT = Engine
BUILDDIR = build
#VERSION
VERSION = 0
PATCHLEVEL = 1
OBJ = main.o cObject.o cObjectHandler.o cRender.o cInput.o
debug: genversion $(OBJ)
mkdir -p $(BUILDDIR)
$(CC) $(CFLAGS) -o $(BUILDDIR)/$(OUTPUT) $(OBJ) $(LDFLAGS)
%.o: %.cpp
@echo
@echo Building $<
@echo ==============
@echo
$(CC) $(CFLAGS) -c $<
all: clean debug
.PHONY: clean
clean:
rm -df $(BUILDDIR)/$(OUTPUT) *.o version.h
run: debug
./$(BUILDDIR)/$(OUTPUT)
genversion:
@echo Building Version
@echo "//Generated my MAKEFILE. DO NOT Edit." > version.h
@echo "#pragma once" >> version.h
@echo "#define VERSION $(VERSION)" >> version.h
@echo "#define PATCHLEVEL $(PATCHLEVEL)" >> version.h
@echo "#define DATE \"`date +'%d.%m.20%y'`\"" >> version.h
@echo "#define TIME \"`date +'%H:%M:%S'`\"" >> version.h
|