From 563c92e6d08c305cb9f7693818ecbe2a2dec527b Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Thu, 29 Nov 2018 20:43:06 -0500 Subject: hello world from initrd --- initrd/Makefile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'initrd/Makefile') diff --git a/initrd/Makefile b/initrd/Makefile index 705ac6c..5946eee 100644 --- a/initrd/Makefile +++ b/initrd/Makefile @@ -1,6 +1,12 @@ +## +# A simple Makefile for building executables loadable by stmos. +# + +ARCH = arm-stmos- +CC = gcc -mcpu=cortex-m4 -mthumb -fsigned-char +CFLAGS = -Os -fPIE + all: - @arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -fsigned-char -Os \ - -nostdinc -nostdlib \ - -fdata-sections -ffunction-sections -Wl,--gc-sections \ - -I../src/pdclib/include -I../src/pdclib/platform/stmos/include \ - test.c ../src/pdclib/pdclib.a -s -o test + @$(ARCH)$(CC) $(CFLAGS) init.c -o init + @arm-stmos-strip init + -- cgit v1.2.3