summaryrefslogtreecommitdiff
path: root/Makefile
blob: f2a3482607c53edd7b845e00c1951f6e7bd0d59f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
CFLAGS=-Wall -g -shared -fPIC

rebuild: clean all

all: file_reader.o file_reader.a file_reader.so 
	$(CC) -Wall -o file_reader ./file_reader.o
	ln -f -s file_reader.so libfile_reader.so
	rm -f file_reader.o

clean:
	rm -f file_reader{.so,.a,.o,}

test: all
	./main



#.o:
#	cc -shared -fPIC -c -o $@ $< 

%.so: %.o
	$(CC) $(INCLUDES) $(CFLAGS) -o $@ $<

%.a: %.o
	ar rcs $@ $<


..