summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/.gitignore5
-rw-r--r--src/Makefile29
-rw-r--r--src/meson.build21
3 files changed, 21 insertions, 34 deletions
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 817142c..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-*.o
-gen-image
-monotonic-ts
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index c40e95a..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-# SPDX-License-Identifier: CC0-1.0
-
-CROSS_COMPILE ?=
-
-CC := $(CROSS_COMPILE)gcc
-CFLAGS ?= -O0 -g -W -Wall -Wno-unused-parameter -Iinclude
-LDFLAGS ?=
-LIBS := -lm
-GEN-IMAGE := gen-image
-MONOTONIC-TS := monotonic-ts
-
-%.o : %.c
- $(CC) $(CFLAGS) -c -o $@ $<
-
-all: $(GEN-IMAGE) $(MONOTONIC-TS)
-
-$(GEN-IMAGE): gen-image.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-$(MONOTONIC-TS): monotonic-ts.o
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
-
-clean:
- -rm -f *.o
- -rm -f $(GEN-IMAGE) $(MONOTONIC_TS)
-
-install:
- cp $(GEN-IMAGE) $(INSTALL_DIR)/
- cp $(MONOTONIC-TS) $(INSTALL_DIR)/
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..3a6118b
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,21 @@
+# SPDX-License-Identifier: CC0-1.0
+
+gen_image_sources = files([
+ 'gen-image.c',
+])
+
+monotonic_ts_sources = files([
+ 'monotonic-ts.c',
+])
+
+m_dep = cc.find_library('m', required : false)
+
+executable('gen-image', gen_image_sources,
+ dependencies : [m_dep],
+ install : true,
+ install_dir : '')
+
+executable('monotonic-ts', monotonic_ts_sources,
+ dependencies : [m_dep],
+ install : true,
+ install_dir : '')