forked from PyxisSociety/SANDAL2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (29 loc) · 628 Bytes
/
Makefile
File metadata and controls
41 lines (29 loc) · 628 Bytes
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
39
40
41
#!/bin/makefile
SRC=$(wildcard *.c)
OFILES=$(SRC:.c=.o)
LDFLAGS=-shared -fPIC
CFLAGS=-Wall -Wextra -pedantic -fPIC -O2
EXEC=libSANDAL2.so
CC=gcc
all:$(EXEC)
$(EXEC):$(OFILES)
$(CC) $(LDFLAGS) $^ -o $(EXEC)
@mv $(EXEC) sandal2/usr/lib
@cp *.h sandal2/usr/include/SANDAL2
@cp Doxdoc/Doc/man/man3/*.gz sandal2/usr/share/man/man3
%.o:%.c
$(CC) $(CFLAGS) -c $< -o $@
clear:
rm *.o *.gc*
package:
dpkg-deb --build sandal2
mv sandal2.deb downloadable
man:
(cd Doxdoc/Doc/man/man3; gzip *.3$ )
clean: clear
cleaner:
rm $(EXEC) *.o *.gc*
install:
dpkg -i downloadable/sandal2.deb
uninstall:
dpkg --purge sandal2