Commit 83ef16ea authored by denis's avatar denis

optimised makefile (use mathlib and mysqlclientlib only during last stage of linking)

parent 71e66241
......@@ -5,7 +5,7 @@ CXXSRCPATH = $(wildcard src/*.cpp)
OBJPATH = $(addprefix build/,$(notdir $(CSRCPATH:.c=.o) $(CXXSRCPATH:.cpp=.o)))
INCLUDES = -I/usr/include/mysql
LIBS = -L/usr/lib/mysql -lmysqlclient -lm
CFLAGS = -lm -Wall -O2 -L/usr/lib/mysql/ -lmysqlclient -pedantic -Wextra -std=c99
CFLAGS = -Wall -O2 -pedantic -Wextra -std=c99
CCFLAGS=-Wall -std=c++11
LDFLAGS=-Wall -lstdc++
......@@ -20,7 +20,7 @@ debug: CCFLAGS += -DDEBUG -g -O0
debug: ichinscratchy
ichinscratchy: $(OBJPATH)
$(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
$(CC) -o $@ $^ $(LIBS) $(LDFLAGS) -lm -L/usr/lib/mysql/ -lmysqlclient
build/%.o: src/%.c
$(CC) $(CFLAGS) -c $(INCLUDES) -o $@ $<
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment