blob: 02ea3b48fae8214ae9f043e049b9471ccafb11e4 (
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
28
29
30
31
32
33
34
35
|
ABI_VERSION := 0
SONAME := libuniso.so.$(ABI_VERSION)
TARGETS := $(SONAME) libuniso.so uniso
CFLAGS ?= -g -Wall
CFLAGS += -fPIC
CFLAGS += -I.
$(SONAME)_OBJS = libuniso.o
$(SONAME)_LDFLAGS = -shared -Wl,-soname,$(SONAME)
uniso_OBJS := uniso.o
uniso_LIBS := -luniso
uniso_LDFLAGS += -L.
all: $(TARGETS)
$(SONAME): $($(SONAME)_OBJS)
libuniso.so: $(SONAME)
ln -s $< $@
%.o: %.c
$(CC) $(CFLAGS) $($@_CFLAGS) -c $^
uniso: $(uniso_OBJS) libuniso.so
uniso $(SONAME):
$(CC) $(LDFLAGS) $($@_LDFLAGS) -o $@ $($@_OBJS) $($@_LIBS)
clean:
rm -f $(TARGETS) *.o
|