summaryrefslogtreecommitdiff
path: root/userspace/sys/Makefile
diff options
context:
space:
mode:
authorMichal Idziorek <m.i@gmx.at>2015-05-13 23:58:39 +0200
committerMichal Idziorek <m.i@gmx.at>2015-05-13 23:58:39 +0200
commitb74c5c8fb4de3b2847bc942e57dcf8f0dea705be (patch)
treefa0a9001cffa64c9193689066bf296dc3df7f844 /userspace/sys/Makefile
parent9a60edf72a3112adae4a914134da1adaf472ad5d (diff)
fixed libc and 'userspace'
Diffstat (limited to 'userspace/sys/Makefile')
-rw-r--r--userspace/sys/Makefile41
1 files changed, 22 insertions, 19 deletions
diff --git a/userspace/sys/Makefile b/userspace/sys/Makefile
index 5e217fa..cdcd3b7 100644
--- a/userspace/sys/Makefile
+++ b/userspace/sys/Makefile
@@ -1,29 +1,32 @@
+SYSROOT=/home/miguel/opt/foolos
CC=i686-foolos-gcc
CFLAGS=
-CFLAGS+=-I../..
CFLAGS+=-w
-
+CFLAGS+=-I../..
+CFLAGS+=-gstabs
OBJECTS=sys.o syscalls.o crt0.o
-full: clean library_install crt_install
+
+full: clean library_install crt_install header_install
+
all: $(OBJECTS)
-library_install: all
- mkdir temp
- mv *.o temp
- cp /home/miguel/temp/sysroot/usr/lib/libc.a .
- ar x libc.a
- rm libc.a
-# rm lib_a-environ.o
- cp temp/sys*.o .
- ar rs libc.a *.o
- mv libc.a /home/miguel/temp/sysroot/usr/lib/libc.a
- cp temp/*.o .
- rm temp -rf
-
-crt_install: all
- cp crt0.o /home/miguel/temp/sysroot/usr/lib/
+crt0.o: crt0.S
+
+crt_install: crt0.o
+ cp crt0.o $(SYSROOT)/usr/lib/
+
+
+header_install:
+ cp termios.h $(SYSROOT)/usr/include/sys/
+
+libfool.a: sys.o syscalls.o
+ ar rcs libfool.a sys.o syscalls.o
+
+library_install: libfool.a
+ cp libfool.a $(SYSROOT)/usr/lib/
+
clean:
- -rm *.o
+ -rm *.o *.a