diff options
author | Marvin Borner | 2021-03-20 19:55:51 +0100 |
---|---|---|
committer | GitHub | 2021-03-20 19:55:51 +0100 |
commit | 5132bac014d63331acf61bb60b9254023f76b869 (patch) | |
tree | 8e2946b7a6630da13ee403c787f77270aeb6185d /apps/Makefile | |
parent | 435231378798819304eef427bad8e77dffea85df (diff) | |
parent | b96c27bba0b242fc860fc9a2fcb63f121312fa7e (diff) |
Merged ELF loading
Diffstat (limited to 'apps/Makefile')
-rw-r--r-- | apps/Makefile | 9 |
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/ |