Initial commit

This commit is contained in:
Mark
2020-07-02 18:11:32 +03:00
commit e58fdd591d
3 changed files with 34 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
build
+27
View File
@@ -0,0 +1,27 @@
CC?=$(CROSS_COMPILE)gcc
CFLAGS?=-ggdb \
-O0 \
-Wall \
-Werror
LDFLAGS?=-lgcc
O=build
sh_OBJS=$(O)/sh.o
all: mkdirs $(O)/sh
mkdirs:
mkdir -p $(O)
clean:
rm -rf $(O)
install: $(O)/sh
install -m0755 $(O)/sh $(DESTDIR)/sh
$(O)/sh: $(sh_OBJS)
$(CC) $(LDFLAGS) -o $@ $(sh_OBJS)
$(O)/%.o: %.c
$(CC) $(CFLAGS) -c -o $@ $<
+6
View File
@@ -0,0 +1,6 @@
#include <stdio.h>
int main(int argc, char **argv) {
printf("This is a stub\n");
return 0;
}