fileshare/Makefile

28 lines
705 B
Makefile

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)
LIBS=-lmicrohttpd $(MAGIC_LIBS)
TARGET=fileshare
SOURCE=main.c logger.c dirlisting.c util.c
DEPS=logger.h templates.h dirlisting.h util.h
OBJ=$(patsubst %.c, %.o, $(SOURCE))
$(TARGET): $(OBJ) $(DEPS) Makefile
$(CC) -o $(TARGET) $(OBJ) $(LIBS)
%.o: %.c $(DEPS) Makefile
$(CC) -c $(CFLAGS) -o $@ $< $(INCLUDES)
doc:
doxygen doxygen.conf
clean:
rm -f $(TARGET)
rm -f $(OBJ)