summaryrefslogtreecommitdiff
path: root/Makefile
blob: e55ac71b51cfe9f943c3aae83946b1d25a112e10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CC=gcc
CFLAGS=-Wall -Werror -pedantic
LIBS=-lpthread
# (Optimization) flags as suggested by SFMT docu.
SFMTFLAGS=-DHAVE_SSE2 -DSFMT_MEXP=19937
OPTIMIZE=-O3 -fno-strict-aliasing
#OPTIMIZE=-ggdb

OBJECTS=nebula2.o config.o render.o statefile.o color.o mutex_helpers.o bmp.o
nebula2: $(OBJECTS) iniparser/libiniparser.a SFMT/SFMT.c
	$(CC) $(CFLAGS) $(OPTIMIZE) $(SFMTFLAGS) $(LIBS) -o nebula2 $(OBJECTS) iniparser/libiniparser.a SFMT/SFMT.c

iniparser/libiniparser.a:
	make -C iniparser libiniparser.a

%.o:%.c
	$(CC) $(CFLAGS) $(OPTIMIZE) $(SFMTFLAGS) -c -o $@ $<

clean:
	rm -f *.o

nuke: clean
	rm -f nebula2