diff options
Diffstat (limited to 'Makefile')
-rwxr-xr-x | Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100755 index 0000000..a4ef8a1 --- /dev/null +++ b/Makefile | |||
@@ -0,0 +1,26 @@ | |||
1 | CFLAGS=-Wall -g -shared -fPIC | ||
2 | |||
3 | rebuild: clean all | ||
4 | |||
5 | all: file_reader.o file_reader.a file_reader.so | ||
6 | $(CC) -Wall -o file_reader ./file_reader.o | ||
7 | rm -f file_reader.o | ||
8 | |||
9 | clean: | ||
10 | rm -f file_reader{.so,.a,.o,} | ||
11 | |||
12 | test: all | ||
13 | ./main | ||
14 | |||
15 | |||
16 | |||
17 | #.o: | ||
18 | # cc -shared -fPIC -c -o $@ $< | ||
19 | |||
20 | %.so: %.o | ||
21 | $(CC) $(INCLUDES) $(CFLAGS) -o $@ $< | ||
22 | |||
23 | %.a: %.o | ||
24 | ar rcs $@ $< | ||
25 | |||
26 | |||