Monorepo for Aesthetic.Computer aesthetic.computer
at main 28 lines 714 B view raw
1ARCH = x86_64 2TARGET = $(ARCH)-elf 3 4CC = gcc 5LD = ld 6 7CFLAGS = -I/usr/include/efi -I/usr/include/efi/$(ARCH) -I/usr/include/efi/protocol -fpic -ffreestanding -fshort-wchar -mno-red-zone 8LDFLAGS = -nostdlib -znocombreloc -T /usr/lib/elf_$(ARCH)_efi.lds -shared -Bsymbolic -L /usr/lib -l:libgnuefi.a -l:libefi.a 9 10SRC = main.c 11OBJ = $(SRC:.c=.o) 12BIN = main.efi 13 14all: $(BIN) 15 16%.efi: %.so 17 objcopy -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc --target=efi-app-$(ARCH) $^ $@ 18 19%.so: $(OBJ) 20 $(LD) $(LDFLAGS) $^ -o $@ 21 22%.o: %.c 23 $(CC) $(CFLAGS) -c $< -o $@ 24 25clean: 26 rm -f *.o *.so *.efi 27 28