Commit 03869bab authored by denis's avatar denis

changed makefile so that program by default gets build without debug symbols....

changed makefile so that program by default gets build without debug symbols. calling 'make debug' will compile with symbols.
parent f83d62a1
Pipeline #7481043 passed with stage
in 1 minute and 35 seconds
......@@ -6,20 +6,25 @@ 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
CCFLAGS=-Wall -g -std=c++11
LDFLAGS=-g -Wall -lstdc++
CCFLAGS=-Wall -std=c++11
LDFLAGS=-Wall -lstdc++
.PHONY: all clean debug
all:ichinscratchy
debug: CFLAGS += -DDEBUG -g
debug: CCFLAGS += -DDEBUG -g
debug: ichinscratchy
ichinscratchy: $(OBJPATH)
$(CC) -g -o $@ $^ $(LIBS) $(LDFLAGS)
$(CC) -o $@ $^ $(LIBS) $(LDFLAGS)
build/%.o: src/%.c
$(CC) $(CFLAGS) -g -c $(INCLUDES) -o $@ $<
$(CC) $(CFLAGS) -c $(INCLUDES) -o $@ $<
build/%.o: src/%.cpp
$(CXX) $(CCFLAGS) -g -c -o $@ $<
$(CXX) $(CCFLAGS) -c -o $@ $<
clean:
rm -f $(OBJPATH)
......
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