Added "debug" and "release" targets to Makefile
This commit is contained in:
parent
fc1562467a
commit
1dab3f798c
12
Makefile
12
Makefile
|
@ -2,9 +2,7 @@ MAGIC_CFLAGS=-DHAVE_MAGIC
|
|||
MAGIC_LIBS=-lmagic
|
||||
|
||||
CC=gcc
|
||||
#CFLAGS+=-O2 -Wall -march=native -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L -D_XOPEN_SOURCE $(LUA_CFLAGS)
|
||||
#CFLAGS+=-O2 -Wall -march=native -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L
|
||||
CFLAGS+=-g -Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L $(MAGIC_CFLAGS)
|
||||
CFLAGS+=-Wall -pedantic -std=c99 -D_POSIX_C_SOURCE=20120607L $(MAGIC_CFLAGS)
|
||||
LIBS=-lmicrohttpd $(MAGIC_LIBS)
|
||||
|
||||
TARGET=fileshare
|
||||
|
@ -13,6 +11,14 @@ DEPS=logger.h templates.h dirlisting.h util.h
|
|||
|
||||
OBJ=$(patsubst %.c, %.o, $(SOURCE))
|
||||
|
||||
all: debug
|
||||
|
||||
debug: CFLAGS+=-O0 -ggdb -DDEBUG
|
||||
debug: $(TARGET)
|
||||
|
||||
release: CFLAGS+=-O3
|
||||
release: $(TARGET)
|
||||
|
||||
$(TARGET): $(OBJ) $(DEPS) Makefile
|
||||
$(CC) -o $(TARGET) $(OBJ) $(LIBS)
|
||||
|
||||
|
|
Loading…
Reference in a new issue