aboutsummaryrefslogtreecommitdiff
path: root/apps/generic.mk
blob: c0ddd3e19111fe154b9dde75a51635830902ad17 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# MIT License, Copyright (c) 2021 Marvin Borner

NAME ?= unknown
LIBS ?= -lc

all: $(OBJS)
	@mkdir -p $(BUILD)/apps/$(NAME)/
	@$(LD) -o $(BUILD)/apps/$(NAME)/exec $(LDFLAGS) $^ $(LIBS)
ifeq ($(CONFIG_STRIP), true)
	@$(ST) --strip-all $(BUILD)/apps/$(NAME)/exec
endif

clean:
	@$(RM) -f $(OBJS)

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