Made Makefile dependencies in subdirectories work correctly
git-svn-id: http://picoc.googlecode.com/svn/trunk@559 21eae674-98b7-11dd-bd71-f92a316d2d60
This commit is contained in:
parent
b1bd91a900
commit
ba05998a87
28
Makefile
28
Makefile
|
@ -11,7 +11,7 @@ SRCS = picoc.c table.c lex.c parse.c expression.c heap.c type.c \
|
||||||
cstdlib/unistd.c
|
cstdlib/unistd.c
|
||||||
OBJS := $(SRCS:%.c=%.o)
|
OBJS := $(SRCS:%.c=%.o)
|
||||||
|
|
||||||
all: depend $(TARGET)
|
all: $(TARGET)
|
||||||
|
|
||||||
$(TARGET): $(OBJS)
|
$(TARGET): $(OBJS)
|
||||||
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|
$(CC) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
|
||||||
|
@ -29,9 +29,27 @@ count:
|
||||||
@echo "Everything:"
|
@echo "Everything:"
|
||||||
@cat $(SRCS) *.h */*.h | wc
|
@cat $(SRCS) *.h */*.h | wc
|
||||||
|
|
||||||
depend:
|
|
||||||
$(CC) -MM $(SRCS) >.depend
|
|
||||||
|
|
||||||
.PHONY: clibrary.c
|
.PHONY: clibrary.c
|
||||||
|
|
||||||
-include .depend
|
picoc.o: picoc.c picoc.h
|
||||||
|
table.o: table.c interpreter.h platform.h
|
||||||
|
lex.o: lex.c interpreter.h platform.h
|
||||||
|
parse.o: parse.c picoc.h interpreter.h platform.h
|
||||||
|
expression.o: expression.c interpreter.h platform.h
|
||||||
|
heap.o: heap.c interpreter.h platform.h
|
||||||
|
type.o: type.c interpreter.h platform.h
|
||||||
|
variable.o: variable.c interpreter.h platform.h
|
||||||
|
clibrary.o: clibrary.c picoc.h interpreter.h platform.h
|
||||||
|
platform.o: platform.c picoc.h interpreter.h platform.h
|
||||||
|
include.o: include.c picoc.h interpreter.h platform.h
|
||||||
|
platform/platform_unix.o: platform/platform_unix.c picoc.h interpreter.h platform.h
|
||||||
|
platform/library_unix.o: platform/library_unix.c interpreter.h platform.h
|
||||||
|
cstdlib/stdio.o: cstdlib/stdio.c interpreter.h platform.h
|
||||||
|
cstdlib/math.o: cstdlib/math.c interpreter.h platform.h
|
||||||
|
cstdlib/string.o: cstdlib/string.c interpreter.h platform.h
|
||||||
|
cstdlib/stdlib.o: cstdlib/stdlib.c interpreter.h platform.h
|
||||||
|
cstdlib/time.o: cstdlib/time.c interpreter.h platform.h
|
||||||
|
cstdlib/errno.o: cstdlib/errno.c interpreter.h platform.h
|
||||||
|
cstdlib/ctype.o: cstdlib/ctype.c interpreter.h platform.h
|
||||||
|
cstdlib/stdbool.o: cstdlib/stdbool.c interpreter.h platform.h
|
||||||
|
cstdlib/unistd.o: cstdlib/unistd.c interpreter.h platform.h
|
||||||
|
|
Loading…
Reference in a new issue