Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
  • 2 commits
  • 3 files changed
  • 0 comments
  • 2 contributors
Nov 22, 2011
connect the dependency between softusb and libhal, add libs dependenc…
…y to bios

Signed-off-by: Xiangfu Liu <xiangfu@sharism.cc>
be76d7d
Sébastien Bourdeauducq Cleanup BIOS makefile 1ee812a
2  softusb-input/Makefile
@@ -5,7 +5,7 @@ all: softusb-input.bin
5 5
 %.bin: %.elf
6 6
 	avr-objcopy -O binary $< $@
7 7
 
8  
-softusb-input.elf: $(SOURCES)
  8
+softusb-input.elf: $(SOURCES) $(wildcard *.h)
9 9
 	avr-gcc -o softusb-input.elf -mmcu=avr2 -mno-interrupts -Wall -Os $(SOURCES) $(CFLAGS) -nostdlib -Wl,-T -Wl,navre.ld
10 10
 
11 11
 .PHONY: clean
19  software/bios/Makefile
@@ -3,6 +3,8 @@ include $(MMDIR)/software/include.mak
3 3
 
4 4
 OBJECTS=crt0.o isr.o main.o unlzma.o boot.o boot-helper.o splash.o
5 5
 SEGMENTS=-j .text -j .data -j .rodata
  6
+LIBS=$(MMDIR)/software/libhpdmc/libhpdmc.a $(MMDIR)/software/libbase/libbase-light.a \
  7
+     $(MMDIR)/software/libhal/libhal.a     $(MMDIR)/software/libnet/libnet.a
6 8
 
7 9
 all: bios.bin bios-rescue.bin
8 10
 
@@ -12,14 +14,25 @@ all: bios.bin bios-rescue.bin
12 14
 	chmod -x $@
13 15
 	$(MMDIR)/tools/mkmmimg $@ write
14 16
 
15  
-# make sure the linker*.ld at the first of depends
16  
-bios.elf: linker.ld $(OBJECTS)
17  
-bios-rescue.elf: linker-rescue.ld $(OBJECTS)
  17
+bios.elf: linker.ld $(OBJECTS) $(LIBS)
  18
+bios-rescue.elf: linker-rescue.ld $(OBJECTS) $(LIBS)
18 19
 
19 20
 %.elf:
20 21
 	$(LD) $(LDFLAGS) -T $< -N -o $@ $(OBJECTS) -L$(MMDIR)/software/libhpdmc -L$(MMDIR)/software/libbase -L$(MMDIR)/software/libhal -L$(MMDIR)/software/libnet --start-group -lhpdmc -lbase-light -lhal -lnet --end-group
21 22
 	chmod -x $@
22 23
 
  24
+$(MMDIR)/software/libhpdmc/libhpdmc.a:
  25
+	make -C $(MMDIR)/software/libhpdmc/
  26
+
  27
+$(MMDIR)/software/libbase/libbase-light.a:
  28
+	make -C $(MMDIR)/software/libbase/
  29
+
  30
+$(MMDIR)/software/libhal/libhal.a:
  31
+	make -C $(MMDIR)/software/libhal/
  32
+
  33
+$(MMDIR)/software/libnet/libnet.a:
  34
+	make -C $(MMDIR)/software/libnet/
  35
+
23 36
 .PHONY: clean depend
24 37
 
25 38
 depend:
5  software/libhal/Makefile
@@ -5,7 +5,7 @@ OBJECTS=brd.o dmx.o font8x16.o mem.o pfpu.o snd.o time.o tmu.o ukb.o usb.o vga.o
5 5
 
6 6
 all: libhal.a
7 7
 
8  
-libhal.a: $(OBJECTS)
  8
+libhal.a: $(OBJECTS) softusb-input.h
9 9
 	$(AR) clr libhal.a $(OBJECTS)
10 10
 	$(RANLIB) libhal.a
11 11
 
@@ -13,10 +13,9 @@ $(MMDIR)/softusb-input/softusb-input.bin:
13 13
 	$(MAKE) -C $(MMDIR)/softusb-input
14 14
 
15 15
 softusb-input.h: $(MMDIR)/softusb-input/softusb-input.bin
16  
-	$(MAKE) -C $(MMDIR)/softusb-input
17 16
 	cat $(MMDIR)/softusb-input/softusb-input.bin | xxd -i - softusb-input.h
18 17
 
19  
-.PHONY: clean depend
  18
+.PHONY: clean depend $(MMDIR)/softusb-input/softusb-input.bin
20 19
 
21 20
 depend: softusb-input.h
22 21
 	makedepend -Y -- $(CFLAGS) -- *.c

No commit comments for this range

Something went wrong with that request. Please try again.