summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-13 11:57:27 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-07-13 11:57:27 +0000
commit154547056ca1ae074c68a9a5aa15925d082f9482 (patch)
tree22f6ffc4c586c5bb9e6c03b1b92c8db5a52943f2 /Makefile
parentInitial commit. (diff)
download0xtools-154547056ca1ae074c68a9a5aa15925d082f9482.tar.xz
0xtools-154547056ca1ae074c68a9a5aa15925d082f9482.zip
Adding upstream version 2.0.3.upstream/2.0.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 40 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3fa2427
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,40 @@
+CC ?= gcc
+PREFIX ?= /usr
+
+# build
+CFLAGS ?= -Wall
+
+# debuginfo included
+CFLAGS_DEBUG=-I include -ggdb -Wall
+
+# debug without compiler optimizations
+CFLAGS_DEBUG0=-I include -ggdb -O0
+
+all:
+ $(CC) $(CFLAGS) -I include -o bin/xcapture src/xcapture.c
+
+debug:
+ $(CC) $(CFLAGS_DEBUG) -o bin/xcapture src/xcapture.c
+
+debug0:
+ $(CC) $(CFLAGS_DEBUG0) -o bin/xcapture src/xcapture.c
+
+install:
+ install -m 0755 -d ${PREFIX}/bin
+ install -m 0755 bin/xcapture ${PREFIX}/bin/xcapture
+ install -m 0755 bin/psn ${PREFIX}/bin/psn
+ install -m 0755 bin/schedlat ${PREFIX}/bin/schedlat
+ install -m 0755 bin/vmtop ${PREFIX}/bin/vmtop
+ install -m 0755 bin/syscallargs ${PREFIX}/bin/syscallargs
+ install -m 0755 -d ${PREFIX}/lib/0xtools
+ install -m 0644 lib/0xtools/psnproc.py ${PREFIX}/lib/0xtools/psnproc.py
+ install -m 0644 lib/0xtools/psnreport.py ${PREFIX}/lib/0xtools/psnreport.py
+ install -m 0644 lib/0xtools/argparse.py ${PREFIX}/lib/0xtools/argparse.py
+
+uninstall:
+ rm -fv ${PREFIX}/bin/xcapture ${PREFIX}/bin/psn ${PREFIX}/bin/schedlat
+ rm -fv ${PREFIX}/lib/0xtools/psnproc.py ${PREFIX}/lib/0xtools/psnreport.py ${PREFIX}/lib/0xtools/argparse.py
+ rm -rfv ${PREFIX}/lib/0xtools
+
+clean:
+ rm -fv bin/xcapture