Added feature bar
This commit is contained in:
parent
eaaca7b281
commit
0de00b46fb
10
Makefile
10
Makefile
@ -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
|
||||
$(CC) -c $< -o $@
|
||||
@ -7,4 +11,4 @@ example: main.o foo.o
|
||||
.PHONY: clean
|
||||
|
||||
clean:
|
||||
rm -f example *.o
|
||||
rm -f example $(OBJECTS)
|
||||
|
||||
7
bar.c
Normal file
7
bar.c
Normal file
@ -0,0 +1,7 @@
|
||||
#include "bar.h"
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
void bar(void) {
|
||||
puts("Hello World from bar().");
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user