Made easier to use other compiler

This commit is contained in:
ceriel
1989-02-16 16:33:29 +00:00
parent f7790b0e8e
commit 9751e398e3
14 changed files with 279 additions and 204 deletions

View File

@@ -1,18 +1,24 @@
EMHOME = ../../..
INSTALL = $(EMHOME)/modules/install
COMPARE = $(EMHOME)/modules/compare
CFLAGS = -O -I$(EMHOME)/modules/h
CFLAGS = -O -I$(EMHOME)/modules/h $(COPT)
SUF = o
RCC = cc #$ must produce a runnable object
MALLOCSRC = READ_ME size_type.h param.h impl.h check.h log.h phys.h \
mal.c log.c phys.c check.c
all: malloc.o
.SUFFIXES: .$(SUF)
.c.$(SUF):
$(CC) -c $(CFLAGS) $*.c
all: malloc.$(SUF)
install: all
$(INSTALL) lib/malloc.o
$(INSTALL) lib/malloc.$(SUF)
cmp: all
$(COMPARE) lib/malloc.o
-$(COMPARE) lib/malloc.$(SUF)
malloc1.c: $(MALLOCSRC) Makefile add_file
rm -f malloc1.c
@@ -29,10 +35,10 @@ opr:
make pr | opr
clean:
rm -f *.o clashes malloc1.c size_type.h getsize malloc.c
rm -f *.$(SUF) clashes malloc1.c size_type.h getsize malloc.c
size_type.h: getsize
getsize > size_type.h
getsize: getsize.o
$(CC) -o getsize getsize.o
getsize: getsize.c
$(RCC) -o getsize getsize.c

View File

@@ -13,12 +13,12 @@ main()
{
if (sizeof(unsigned int) == sizeof(char *)) {
puts("typedef unsigned int size_type;");
return 0;
exit(0);
}
if (sizeof(long) == sizeof(char *)) {
puts("typedef long size_type;");
return 0;
exit(0);
}
fputs(stderr, "funny pointer size\n");
return 1;
exit(1);
}