diff options
| author | Max Christian Pohle | 2016-05-05 16:01:15 +0200 |
|---|---|---|
| committer | Max Christian Pohle | 2016-05-05 16:01:15 +0200 |
| commit | f40223504106ffdff83fbf9a0af16abf0eceb993 (patch) | |
| tree | 79350e3422a2f554a37eaa66c27351cb0dc2bf2f /Makefile | |
| download | libfile_reader-f40223504106ffdff83fbf9a0af16abf0eceb993.tar.bz2 libfile_reader-f40223504106ffdff83fbf9a0af16abf0eceb993.zip | |
simple and failsafe reader
this simple library is used to separate file I/O functions from other
tasks which can easily cause race conditions.
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 | |||
