summaryrefslogtreecommitdiff
path: root/Makefile
blob: ab577111f850637b627d70d93ae43ad5b19e0a52 (plain) (blame)
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
PROJ=libarg
CC=g++
CFLAGS=-Wall -fpermissive -fno-rtti -fno-exceptions -fno-unwind-tables -Wno-comment
LDFLAGS=

SOURCE=arg
OBJECTS=$(SOURCE:=.o)
SOURCES=$(SOURCE:=.c)

%.o: %.c
	$(CC) $(CFLAGS) -c $<

make: dynamic static 

dynamic: CFLAGS+=-fPIC
dynamic: clean $(OBJECTS)
	$(CC) $(CFLAGS) $(OBJECTS) -shared -o $(PROJ).so

static: clean $(OBJECTS)
	ar rcs $(PROJ).a $(OBJECTS)


clean:
	rm -rf *.o
	rm -rf *.a
	rm -rf *.so