File tree 4 files changed +38
-2
lines changed
4 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 1
- all : cstyle
1
+ MAKE =make
2
2
3
- .PHONY : cstyle
3
+ SUBDIRS =assert \
4
+ debug
5
+
6
+ all : $(SUBDIRS ) cstyle
7
+
8
+ $(SUBDIRS ) :
9
+ @$(MAKE ) -C $@
10
+
11
+ clean :
12
+ for dir in $( SUBDIRS) ; do \
13
+ $(MAKE ) -C $$ dir $@ ; \
14
+ done
15
+
16
+ .PHONY : cstyle all clean $(SUBDIRS )
4
17
cstyle :
5
18
@echo " checking C style"
6
19
@find . -type f -name ' *.c' | while read file; do \
Original file line number Diff line number Diff line change
1
+ CC=cc
2
+ CFLAGS=-Wall -pedantic
3
+
4
+ %.o: %.c
5
+ $(CC) $(CFLAGS) -c $<
Original file line number Diff line number Diff line change
1
+ include ../Makefile.common
2
+
3
+ all : assert
4
+
5
+ assert : assert.o
6
+ $(CC ) -o $@ $<
7
+
8
+ clean :
9
+ rm -f * .o a.out assert
Original file line number Diff line number Diff line change
1
+ include ../Makefile.common
2
+
3
+ all : coredump
4
+
5
+ assert : coredump.o
6
+ $(CC ) -o $@ $<
7
+
8
+ clean :
9
+ rm -f * .o a.out coredump
You can’t perform that action at this time.
0 commit comments