-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
29 lines (28 loc) · 835 Bytes
/
Makefile
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
SRC = main.cpp petricalc.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp
OBJ = $(SRC:.cpp=.o)
OUT = PetriCalc
INCLUDES =
DEBUG = 5
OPTIMIZE = -g
VERSION = `git describe --tags`
CCFLAGS = -Wall -Wextra -funsigned-char $(OPTIMIZE) -DDEBUG=$(DEBUG) -DVERSION=$(VERSION) -DTIXML_USE_STL
MINGPATH=/home/thulinma/cpp/mingw/mingw_cross_env-2.1/usr/i386-mingw32msvc
CC = $(CROSS)g++
LD = $(CROSS)ld
AR = $(CROSS)ar
LIBS =
.SUFFIXES: .cpp
.PHONY: clean default
default: $(OUT)
fast:
make clean default OPTIMIZE=-Ofast DEBUG=0
realfast:
make clean default OPTIMIZE="-Ofast -march=native" DEBUG=0
.cpp.o:
$(CC) $(INCLUDES) $(CCFLAGS) $(LIBS) -c $< -o $@
$(OUT): $(OBJ)
$(CC) $(LIBS) -o $(OUT) $(OBJ)
clean:
rm -rf $(OBJ) $(OUT) Makefile.bak *~
windows:
make clean default OUT=$(OUT).exe OPTIMIZE=-O3 DEBUG=0 CROSS=i386-mingw32msvc-