ref: 35be3954232412816397a6bebfe5b08cb7fa0680
parent: 056f0df601d2fd1150c29564cb57f53a3e74e3e2
author: Ori Bernstein <[email protected]>
date: Wed Jun 13 10:59:52 EDT 2012
Rename 'libdeps' to 'deps'. It's more general than just libs.
--- a/8/Makefile
+++ b/8/Makefile
@@ -4,7 +4,7 @@
reduce.o \
regalloc.o \
-LIBDEPS=../parse/libparse.a ../opt/libopt.a
+DEPS=../parse/libparse.a ../opt/libopt.a
include ../mk/lexyacc.mk
include ../mk/c.mk
--- a/mk/c.mk
+++ b/mk/c.mk
@@ -1,9 +1,9 @@
_DEPSDIR = .deps
_DEPS=$(addprefix $(_DEPSDIR)/, $(OBJ:.o=.d))
-_LIBSRCHPATHS=$(addprefix -L, $(dir $(LIBDEPS)))
-_LIBINCPATHS=$(addprefix -I, $(dir $(LIBDEPS)))
-_LIBPATHS=$(addprefix -l, $(patsubst lib%.a,%,$(notdir $(LIBDEPS))))
+_LIBSRCHPATHS=$(addprefix -L, $(dir $(DEPS)))
+_LIBINCPATHS=$(addprefix -I, $(dir $(DEPS)))
+_LIBPATHS=$(addprefix -l, $(patsubst lib%.a,%,$(notdir $(DEPS))))
CFLAGS += -Wall -Werror -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
CFLAGS += -g
@@ -21,8 +21,8 @@
$(BIN): $(OBJ) $(EXTRADEP) libs
$(CC) -o $@ $(OBJ) $(_LIBSRCHPATHS) $(_LIBPATHS)
-libs: $(LIBDEPS)
- @for i in $(dir $(LIBDEPS)); do (\
+libs: $(DEPS)
+ @for i in $(dir $(DEPS)); do (\
cd $$i && \
$(MAKE) || \
exit 1 \
--- a/opt/Makefile
+++ b/opt/Makefile
@@ -2,9 +2,7 @@
OBJ=cfg.o \
df.o \
-CFLAGS+=-I../parse
-LDFLAGS+=-L../parse -lparse
-EXTRADEP=../parse/libparse.a
+DEPS=../parse/libparse.a
include ../mk/lexyacc.mk
include ../mk/c.mk