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

%.o : %.c
	$(CC) $(CFLAGS) -c -o $@ $<

all: $(GEN-IMAGE)

$(GEN-IMAGE): gen-image.o
	$(CC) $(LDFLAGS) -o $@ $^ $(LIBS)

clean:
	-rm -f *.o
	-rm -f $(GEN-IMAGE)

install:
	cp $(GEN-IMAGE) $(INSTALL_DIR)/