2008-12-26 12:00:51 -05:00
|
|
|
INCS=-Isrc/include
|
2008-12-19 19:35:09 -05:00
|
|
|
LIBEDIT_DIR=../../libs/libedit
|
2008-12-21 16:54:43 -05:00
|
|
|
DEBUG=-g -ggdb
|
|
|
|
PICKY=-O2 -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
|
2008-12-31 14:44:16 -05:00
|
|
|
CFLAGS=$(INCS) -DHAVE_EDITLINE $(DEBUG) -I$(LIBEDIT_DIR)/src/ $(PICKY)
|
2008-12-19 19:35:09 -05:00
|
|
|
MYLIB=libesl.a
|
2008-12-26 12:54:30 -05:00
|
|
|
LIBS=-lncurses -lpthread -lesl
|
2008-12-20 10:40:33 -05:00
|
|
|
LDFLAGS=-L.
|
2008-12-20 00:24:51 -05:00
|
|
|
OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o
|
2008-12-21 16:54:43 -05:00
|
|
|
SRC=src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c
|
|
|
|
HEADERS=src/include/esl_config.h src/include/esl_event.h src/include/esl.h src/include/esl_threadmutex.h
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2008-12-20 10:40:33 -05:00
|
|
|
all: $(MYLIB) fs_cli testclient testserver
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2008-12-21 16:54:43 -05:00
|
|
|
$(MYLIB): $(OBJS) $(HEADERS) $(SRC)
|
2008-12-19 19:35:09 -05:00
|
|
|
ar rcs $(MYLIB) $(OBJS)
|
|
|
|
ranlib $(MYLIB)
|
|
|
|
|
2008-12-20 10:40:33 -05:00
|
|
|
testserver: $(MYLIB) testserver.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver $(LDFLAGS) $(LIBS)
|
2008-12-19 19:35:09 -05:00
|
|
|
|
2008-12-20 10:40:33 -05:00
|
|
|
testclient: $(MYLIB) testclient.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testclient.c -o testclient $(LDFLAGS) $(LIBS)
|
2008-12-19 19:35:09 -05:00
|
|
|
|
|
|
|
fs_cli: $(MYLIB) fs_cli.c
|
2008-12-20 10:40:33 -05:00
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) fs_cli.c -o fs_cli $(LDFLAGS) -L$(LIBEDIT_DIR)/src/.libs $(LIBS) -ledit
|
|
|
|
|
|
|
|
%.o: %.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) -c $< -o $@
|
2008-12-19 19:35:09 -05:00
|
|
|
|
|
|
|
clean:
|
2008-12-20 10:40:33 -05:00
|
|
|
rm -f *.o src/*.o testclient testserver fs_cli libesl.a *~ src/*~ src/include/*~
|
2008-12-19 19:35:09 -05:00
|
|
|
|