summaryrefslogtreecommitdiff
path: root/userspace
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-10 21:54:10 +0200
committerMiguel <m.i@gmx.at>2018-10-10 21:54:10 +0200
commite2005fda57ea4da12754d67ba127b09508125395 (patch)
tree959aec5c5847bec7c2a404dc9be0fba80b95faf1 /userspace
parente9495844291a85a1f7ba3c76742a0dd1bf574e5f (diff)
cross compiling struggles
Diffstat (limited to 'userspace')
-rw-r--r--userspace/Makefile10
-rw-r--r--userspace/myclear.c (renamed from userspace/clear.c)0
-rw-r--r--userspace/ncurses/Makefile10
-rw-r--r--userspace/ncurses/ncurs.c13
4 files changed, 32 insertions, 1 deletions
diff --git a/userspace/Makefile b/userspace/Makefile
index f7d0ae5..dc5509c 100644
--- a/userspace/Makefile
+++ b/userspace/Makefile
@@ -1,4 +1,4 @@
-IMAGESIZE=40000 #ext2.img size in Kb
+IMAGESIZE=60000 #ext2.img size in Kb
#######################
@@ -36,6 +36,7 @@ ext2.img: $(PROGS)
make -C fonts
make -C xterm
make -C cpp
+ make -C ncurses
@echo "----------------------"
@echo "Creating ext2.img ...."
@dd if=/dev/zero of=ext2.img bs=1024 count=$(IMAGESIZE)
@@ -54,6 +55,8 @@ ext2.img: $(PROGS)
@cp fonts/binfont.bin mnt/doc/fonts
@cp xterm/xterm mnt/bin
@cp cpp/testcpp mnt/bin
+ @cp ncurses/ncurs mnt/bin
+ @cp /home/miguel/temp/foolos/usr/bin/* mnt/bin
# cp ~/temp/fool-os-stuff/binutils-build-host-foolos/binutils/readelf mnt/bin
# cp ../font/binfont.bin mnt/
@@ -77,6 +80,11 @@ clean:
make -C fonts clean
make -C xterm clean
make -C cpp clean
+ make -C ncurses clean
@echo "Cleaning userspace ..."; rm -f *.o $(PROGS) ext2.img *.d
+umount:
+ sudo umount mnt
+ rm mnt -r
+
new: clean all
diff --git a/userspace/clear.c b/userspace/myclear.c
index 1c794b8..1c794b8 100644
--- a/userspace/clear.c
+++ b/userspace/myclear.c
diff --git a/userspace/ncurses/Makefile b/userspace/ncurses/Makefile
new file mode 100644
index 0000000..4a8fc56
--- /dev/null
+++ b/userspace/ncurses/Makefile
@@ -0,0 +1,10 @@
+CC=i686-foolos-gcc
+AS=i686-foolos-as
+
+LDLIBS=-lncurses -lcurses
+CFLAGS=-static
+
+ncurs:
+
+clean:
+ rm -f *.o ncurs
diff --git a/userspace/ncurses/ncurs.c b/userspace/ncurses/ncurs.c
new file mode 100644
index 0000000..6edf8e6
--- /dev/null
+++ b/userspace/ncurses/ncurs.c
@@ -0,0 +1,13 @@
+#include <ncurses.h>
+
+int main()
+{
+
+// initscr(); /* Start curses mode */
+// printw("Hello World !!!"); /* Print Hello World */
+// refresh(); /* Print it on to the real screen */
+// getch(); /* Wait for user input */
+// endwin(); /* End curses mode */
+
+ return 0;
+}