diff --git a/Makefile b/Makefile index b5e8132..d655b0b 100644 --- a/Makefile +++ b/Makefile @@ -1,14 +1,16 @@ -PREFIX=/usr/local +PREFIX?=/usr/local INC=-I$(PREFIX)/include -LIB=-L$(PREFIX)/lib -lutil -FLAGS=-Wall -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing +LIB=-L$(PREFIX)/lib -lutil +CFLAGS=-g -Wall -Wextra -O2 -pipe -funroll-loops -ffast-math -fno-strict-aliasing CC?=cc +SOURCES=$(wildcard src/**/*.c src/*.c) + all: fsipd -fsipd: fsipd.c Makefile - $(CC) $(FLAGS) $(INC) $(LIB) fsipd.c -o fsipd +fsipd: $(SOURCES) Makefile + $(CC) $(CFLAGS) $(INC) $(LIB) src/fsipd.c -o bin/fsipd clean: - rm -f fsipd + rm -f bin/* diff --git a/fsipd.c b/src/fsipd.c similarity index 100% rename from fsipd.c rename to src/fsipd.c