aboutsummaryrefslogtreecommitdiff
path: root/apps/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'apps/Makefile')
-rw-r--r--apps/Makefile9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/Makefile b/apps/Makefile
index 1a7aff3..d43104a 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -4,17 +4,18 @@ COBJS = init.o idle.o wm.o test.o window.o #mandelbrot.o window.o exec.o files.o
CC = ccache ../cross/opt/bin/i686-elf-gcc
LD = ccache ../cross/opt/bin/i686-elf-ld
OC = ccache ../cross/opt/bin/i686-elf-objcopy
+ST = ccache ../cross/opt/bin/i686-elf-strip
-CFLAGS = $(CFLAGS_DEFAULT) -I../libc/inc/ -I../libgui/inc/ -I../libtxt/inc/ -fPIE -Duserspace
+CFLAGS = $(CFLAGS_DEFAULT) -I../libc/inc/ -I../libgui/inc/ -I../libtxt/inc/ -Duserspace
all: $(COBJS)
%.o: %.c
@mkdir -p ../build/apps/
@$(CC) -c $(CFLAGS) $< -o $@
- @$(LD) -o $(@:.o=.elf) -Tlink.ld -L../build/ $@ -lgui -ltxt -lc
- @$(OC) -O binary $(@:.o=.elf) ../build/apps/$(@:.o=)
- @cp $(@:.o=.elf) ../build/apps/$(@:.o=.elf)
+ @$(LD) -o $(@:.o=.elf) --section-start=.text=0x42000000 -L../build/ -static $@ -lgui -ltxt -lc
+ @cp $(@:.o=.elf) ../build/apps/$(@:.o=)
+#@$(ST) --strip-all ../build/apps/$(@:.o=)
# %.o: %.c
# @mkdir -p ../build/apps/