Browse code

- updated Makefile to properly handle mem/* - fixed makefile bug (make w/ no targets didn't build the dependencies)

Andrei Pelinescu-Onciul authored on 15/01/2002 15:11:15
Showing 2 changed files
... ...
@@ -34,11 +34,14 @@ include Makefile.defs
34 34
 export DEFS PROFILE CC  LD MKDEP MKTAGS CFLAGS LDFLAGS MOD_CFLAGS MOD_LDFLAGS
35 35
 export LEX YACC YACC_FLAGS
36 36
 
37
+
37 38
 # include the common rules
38 39
 include Makefile.rules
39 40
 
40 41
 #extra targets 
41 42
 
43
+$(NAME): static_modules
44
+
42 45
 lex.yy.c: cfg.lex $(ALLDEP)
43 46
 	$(LEX) $<
44 47
 
... ...
@@ -48,7 +51,6 @@ cfg.tab.c: cfg.y $(ALLDEP)
48 48
 .PHONY: all
49 49
 all: $(NAME) modules
50 50
 
51
-$(NAME): static_modules
52 51
 
53 52
 
54 53
 .PHONY: modules
... ...
@@ -76,3 +78,5 @@ dbg: ser
76 76
 
77 77
 tar: mantainer-clean 
78 78
 	tar -C .. -zcf ../$(NAME)-$(RELEASE)_src.tar.gz  $(notdir $(CURDIR)) 
79
+
80
+
... ...
@@ -13,12 +13,12 @@
13 13
 
14 14
 
15 15
 #implicit rules
16
-%.o:%.c $(ALLDEP)
16
+%.o:%.c  $(ALLDEP)
17 17
 	$(CC) $(CFLAGS) $(DEFS) -c $< -o $@
18 18
 
19 19
 %.d: %.c $(ALLDEP)
20 20
 	@set -e; $(MKDEP) $< \
21
-	|  sed 's/\($*\)\.o[ :]*/\1.o $@ : /g' > $@; \
21
+	|  sed 's#\($*\)\.o[ :]*#\1.o $@ : #g' > $@; \
22 22
 	[ -s $@ ] || rm -f $@
23 23
 
24 24
 
... ...
@@ -59,7 +59,9 @@ mantainer-clean: distclean
59 59
 TAGS:
60 60
 	$(MKTAGS) 
61 61
 	
62
-
62
+ifeq (,$(MAKECMDGOALS))
63
+include $(depends)
64
+endif
63 65
 ifneq (,$(filter-out clean proper distclean realclean mantainer-clean TAGS \
64 66
 		tar modules, $(MAKECMDGOALS)))
65 67
 include $(depends)