aboutsummaryrefslogtreecommitdiff
path: root/apps/Makefile
blob: 98bec4755230bf1afd7b33edddf343e0a0a15d01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# MIT License, Copyright (c) 2020 Marvin Borner

CFLAGS = $(CFLAGS_DEFAULT) -I$(LIBS)/ -I$(LIBS)/libc/inc/ -pie -fPIE -fPIC -DUSER
LDFLAGS = --section-start=.text=0x42000000 -L$(BUILD)
DIRS = $(wildcard */.)

ifneq ($(DEBUG), 1)
	LDFLAGS += -pie -no-dynamic-linker
endif

export

all: $(DIRS)
$(DIRS):
	@mkdir -p $(BUILD)/apps/
	@$(MAKE) --no-print-directory -C $@
	@$(MAKE) clean --no-print-directory -C $@

.PHONY: all $(DIRS)