Added feature bar
This commit is contained in:
1 parent
eaaca7b281
commit
0de00b46fb
4 files changed
+22
-3
No files matched your search
@@ -1,5 +1,9 @@
|
|||||||
example: main.o foo.o
|
|
||||||
$(CC) main.o foo.o -o $@
|
SOURCES = $(wildcard *.c)
|
||||||
|
OBJECTS = $(SOURCES:.c=.o)
|
||||||
|
|
||||||
|
example: $(OBJECTS)
|
||||||
|
$(CC) $(OBJECTS) -o $@
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
$(CC) -c $< -o $@
|
$(CC) -c $< -o $@
|
||||||
@@ -7,4 +11,4 @@ example: main.o foo.o
|
|||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f example *.o
|
rm -f example $(OBJECTS)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#include "bar.h"
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
void bar(void) {
|
||||||
|
puts("Hello World from bar().");
|
||||||
|
}
|
||||||
Reference in new issue
Block a user