From bb0cb1f342a7a5cfe700c5dcf81c24ff4a87d67e Mon Sep 17 00:00:00 2001 From: tomas Date: Fri, 8 Apr 2005 18:55:00 +0000 Subject: Upgrading Makefile for new directory structure. --- Makefile | 23 ++++++++++++----------- config | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index b0bf741..52e2e5a 100644 --- a/Makefile +++ b/Makefile @@ -1,34 +1,35 @@ -# $Id: Makefile,v 1.13 2005/01/21 10:19:04 tomas Exp $ +# $Id: Makefile,v 1.14 2005/04/08 18:55:00 tomas Exp $ T= lfs include ./config -V= 1.1b +V= 1.1 DIST_DIR= luafilesystem-$V TAR_FILE= $(DIST_DIR).tar.gz ZIP_FILE= $(DIST_DIR).zip LIBNAME= lib$T.$V$(LIB_EXT) -SRCS= $T.c -OBJS= $T.o compat-5.1.o +COMPAT_O= $(COMPAT_DIR)/compat-5.1.o +SRCS= src/$T.c +OBJS= src/$T.o $(COMPAT_O) -lib: $(LIBNAME) +lib: src/$(LIBNAME) -$(LIBNAME): $(OBJS) - $(CC) $(CFLAGS) $(LIB_OPTION) -o $(LIBNAME) $(OBJS) $(LIBS) +src/$(LIBNAME): $(OBJS) + $(CC) $(CFLAGS) $(LIB_OPTION) -o src/$(LIBNAME) $(OBJS) $(LIBS) -compat-5.1.o: $(COMPAT_DIR)/compat-5.1.c +$(COMPAT_O): $(COMPAT_DIR)/compat-5.1.c $(CC) -c $(CFLAGS) -o $@ $(COMPAT_DIR)/compat-5.1.c -install: $(LIBNAME) +install: src/$(LIBNAME) mkdir -p $(LUA_LIBDIR) - cp $(LIBNAME) $(LUA_LIBDIR) + cp src/$(LIBNAME) $(LUA_LIBDIR) ln -f -s $(LUA_LIBDIR)/$(LIBNAME) $(LUA_LIBDIR)/$T$(LIB_EXT) clean: - rm -f $L $(LIBNAME) $(OBJS) + rm -f $L src/$(LIBNAME) $(OBJS) dist: dist_dir tar -czf $(TAR_FILE) $(DIST_DIR) diff --git a/config b/config index 8074521..b6d0ddb 100644 --- a/config +++ b/config @@ -12,7 +12,7 @@ LIB_EXT= .so #LIB_OPTION= -dynamiclib #for MacOS X LIB_OPTION= -shared #for Linux -COMPAT_DIR= . +COMPAT_DIR= ../compat/src # Compilation directives # On FreeBSD systems, the following line should be commented -- cgit v1.2.3-55-g6feb