2008-12-20 00:35:09 +00:00
|
|
|
PWD=$(shell pwd)
|
|
|
|
INCS=-I$(PWD)/src/include
|
|
|
|
LIBEDIT_DIR=../../libs/libedit
|
|
|
|
CFLAGS=$(INCS) -g -ggdb -I$(LIBEDIT_DIR)/src/
|
|
|
|
MYLIB=libesl.a
|
2008-12-20 15:40:33 +00:00
|
|
|
LIBS=-lesl -lncurses -lpthread
|
|
|
|
LDFLAGS=-L.
|
2008-12-20 05:24:51 +00:00
|
|
|
OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o
|
2008-12-20 00:35:09 +00:00
|
|
|
|
2008-12-20 15:40:33 +00:00
|
|
|
all: $(MYLIB) fs_cli testclient testserver
|
2008-12-20 00:35:09 +00:00
|
|
|
|
|
|
|
$(MYLIB): $(OBJS) $(HEADERS)
|
|
|
|
ar rcs $(MYLIB) $(OBJS)
|
|
|
|
ranlib $(MYLIB)
|
|
|
|
|
2008-12-20 15:40:33 +00:00
|
|
|
testserver: $(MYLIB) testserver.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testserver.c -o testserver $(LDFLAGS) $(LIBS)
|
2008-12-20 00:35:09 +00:00
|
|
|
|
2008-12-20 15:40:33 +00:00
|
|
|
testclient: $(MYLIB) testclient.c
|
|
|
|
$(CC) $(CC_CFLAGS) $(CFLAGS) testclient.c -o testclient $(LDFLAGS) $(LIBS)
|
2008-12-20 00:35:09 +00:00
|
|
|
|
|
|
|
fs_cli: $(MYLIB) fs_cli.c
|
2008-12-20 15:40:33 +00: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-20 00:35:09 +00:00
|
|
|
|
|
|
|
clean:
|
2008-12-20 15:40:33 +00:00
|
|
|
rm -f *.o src/*.o testclient testserver fs_cli libesl.a *~ src/*~ src/include/*~
|
2008-12-20 00:35:09 +00:00
|
|
|
|