summaryrefslogtreecommitdiff
path: root/src/Makefile
blob: c40e95afca503d950d3e6c0b9d78dd333052c591 (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
# 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)/