-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (20 loc) · 930 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
.SILENT:
include Makefile.flags
objects = $(patsubst %.c,%.o,$(shell find . -name "*.c")) $(patsubst %.cpp,%.o,$(shell find . -name "*.cpp"))
objects_fasm = $(patsubst %.S,%.o,$(shell find . -name "*.S"))
objects_test = $(patsubst %.c,%.o,$(shell find . -name "test_*.c")) $(patsubst %.cpp,%.o,$(shell find . -name "test_*.cpp"))
objects := $(filter-out $(objects_test),$(objects))
all: Main.efi
include embed/Makefile
Main.efi: initrd $(objects) $(objects_fasm)
$(LD) $(LDFLAGS) $(objects) $(objects_fasm) $(LDLIBS)
clean:
echo " -RM Main.efi $(objects)"
-$(RM) -f Main.efi $(objects) $(objects_fasm) embed/initrd.tar
install: Main.efi
echo " CP Main.efi ../FAT/EFI/Boot/bootx64.efi"
$(CP) Main.efi ../FAT/EFI/Boot/bootx64.efi
upload: Main.efi
echo " SCP Main.efi router.edgaru089.ml:/opt/tftp/"
scp -P 29657 Main.efi [email protected]:/opt/tftp/
.PHONY: all clean install upload