Pixelflut/pixelnuke/Makefile
Marcel Hellkamp 1b36a66243 Optimized decimal and hex string parsing in hot path.
Using specialized and inline-able parsers instead of strtoul() improved
pixel throughput from ~63MB/s to ~83MB/s (+30%) on a single core
on my machine.

As a side effect, the PX command now allows any non-decimal
character as separator between parameters ¯\_(ツ)_/¯
2018-04-02 17:26:08 +02:00

27 lines
502 B
Makefile

.PHONY: default all clean
CC = gcc
CFLAGS = -Wall -pthread
LIBS = -levent -levent_pthreads -lrt -lGL -lGLEW -lglfw
TARGET = pixelnuke
default: CFLAGS += -O2 -flto
default: $(TARGET)
all: default
debug: CFLAGS += -DDEBUG -g
debug: $(TARGET)
OBJECTS = $(patsubst %.c, %.o, $(wildcard *.c))
HEADERS = $(wildcard *.h)
%.o: %.c $(HEADERS)
$(CC) $(CFLAGS) -c $< -o $@
.PRECIOUS: $(TARGET) $(OBJECTS)
$(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) -Wall $(LIBS) -o $@
clean:
-rm -f *.o $(TARGET)