-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile
40 lines (31 loc) · 1.01 KB
/
Makefile
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
36
37
38
#
# makefile for compiling libdasm and examples
#
CC = gcc
CFLAGS = -Wall -O3 -fPIC
PREFIX = /usr/local
LIBDIR = $(PREFIX)/lib
INCDIR = $(PREFIX)/include
DESTDIR = /
all: libdasm.o
$(CC) $(CFLAGS) -shared -fPIC -Wl,-soname,libdasm.so.1 -o libdasm.so libdasm.c
ar rc libdasm.a libdasm.o && ranlib libdasm.a
make -C examples
make -C pydasm
install:
install -p -D libdasm.so $(DESTDIR)$(LIBDIR)/libdasm.so.1.0
ln -s "libdasm.so.1.0" $(DESTDIR)$(LIBDIR)/libdasm.so.1
ln -s "libdasm.so.1.0" $(DESTDIR)$(LIBDIR)/libdasm.so
install -d $(DESTDIR)$(INCDIR)
install -m 644 -p libdasm.h $(DESTDIR)$(INCDIR)/libdasm.h
install -m 644 -p -D libdasm.a $(DESTDIR)$(LIBDIR)/libdasm.a
make -C examples install DESTDIR=$(DESTDIR)
make -C pydasm install DESTDIR=$(DESTDIR)
uninstall:
rm -f $(DESTDIR)$(INCDIR)/libdasm.h
rm -f $(DESTDIR)$(LIBDIR)/libdasm.a
rm -f $(DESTDIR)$(LIBDIR)/libdasm.so.1.0 $(DESTDIR)$(LIBDIR)/libdasm.so
clean:
rm -f libdasm.o libdasm.so libdasm.a
make -C examples clean
make -C pydasm clean