File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ $(test_ARCHIVE) :
5555.PHONY : clean help
5656
5757clean :
58- make -C ds/ clean
5958 make -C test/ clean
59+ # make -C ds/ clean
6060 find ${PROJ_PATH} -name "*.[ao]" -exec rm -v {} \;
6161
6262
Original file line number Diff line number Diff line change @@ -4,14 +4,24 @@ common_OBJ=bin/common.o
44
55common_ARCHIVE =$(PROJ_PATH ) /common/bin/common.a
66
7+ logger_SRC =src/logger.c
8+ logger_OBJ =bin/logger.o
9+
10+ common_ARCHIVE =$(PROJ_PATH ) /common/bin/common.a
11+
712OBJS =$(common_OBJ )
13+ OBJS+ =$(logger_OBJ )
814
915$(common_OBJ ) : $(common_SRC )
1016 $(CC ) $(INCLUDES ) -c $^ -o $@ $(CFLAGS )
1117
18+ $(logger_OBJ ) : $(logger_SRC )
19+ $(CC ) $(INCLUDES ) -c $^ -o $@ $(CFLAGS )
20+
1221all : $(OBJS )
1322 @echo " building common"
1423 ar rcs $(common_ARCHIVE ) $(OBJS )
24+ rm -f $(OBJS )
1525
1626
1727.PHONY : clean
Original file line number Diff line number Diff line change 11#include "os.h"
22#include "typedefs.h"
3+ #include "logger.h"
34
Original file line number Diff line number Diff line change 1+
2+ void logger_init ();
Original file line number Diff line number Diff line change 1+ #include "common.h"
2+
3+ void logger_init ()
4+ {
5+ printf ("Logger init\n" );
6+ }
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ $(test_OBJ): $(test_SRC)
1717
1818all : $(OBJS )
1919 ar rcs $(test_ARCHIVE ) $(OBJS )
20+ rm -f $(OBJS )
2021
2122
2223.PHONY : clean
Original file line number Diff line number Diff line change 44int main (int argc , char * argv [])
55{
66 printf ("Hello World\n" );
7-
7+ logger_init ();
88 return 0 ;
99}
You can’t perform that action at this time.
0 commit comments