Added mechanism to change default directory

This commit is contained in:
ceriel 1989-10-24 16:54:55 +00:00
parent 88a316478d
commit 80cb794116
2 changed files with 10 additions and 3 deletions

View file

@ -14,7 +14,9 @@ GFILES =$(GENGFILES) $(GF)
LLGENOPTIONS =
PROFILE =
M2COMPILER = m2
CFLAGS = -O $(PROFILE) $(INCLUDES) -DSTATIC= -DM2COMPILER=\"$(M2COMPILER)\"
DEFDIR = lib/m2
HOMEDIR =
CFLAGS = -O $(PROFILE) $(INCLUDES) -DSTATIC= -DM2COMPILER=\"$(M2COMPILER)\" -DDEF_DIR=$(DEFDIR) $(HOMEDIR)
LINTFLAGS = -DSTATIC= -DNORCSID
MALLOC = $(LIBDIR)/malloc.o
LDFLAGS = -i $(PROFILE)
@ -34,7 +36,7 @@ HFILES =$(GENH) $(HSRC)
GENFILES = $(GENGFILES) $(GENC) $(GENH)
all: Cfiles
make "EMHOME="$(EMHOME) "M2COMPILER="$(M2COMPILER) m2mm
make "EMHOME="$(EMHOME) "DEFDIR="$(DEFDIR) "HOMEDIR="$(HOMEDIR) "M2COMPILER="$(M2COMPILER) m2mm
install: all
cp m2mm $(EMHOME)/bin

View file

@ -13,6 +13,10 @@
#include <alloc.h>
#include "main.h"
#ifdef OTHER_HOME
#undef EM_DIR
#define EM_DIR OTHER_HOME
#endif
static char lib_dir[128] = EM_DIR;
static struct liblist {
@ -41,7 +45,8 @@ init_lib()
{
extern char *strcat();
strcat(lib_dir, "/lib/m2");
strcat(lib_dir, "/");
strcat(lib_dir, DEF_DIR);
AddLibDir(lib_dir);
}