File: Makefile

package info (click to toggle)
aboot 0.9b-3
  • links: PTS
  • area: main
  • in suites: etch-m68k, sarge
  • size: 984 kB
  • ctags: 1,659
  • sloc: ansic: 8,970; perl: 738; makefile: 382; asm: 309; sh: 3
file content (42 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (4)
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
35
36
37
38
39
40
41
42
ifndef ($(CC))
CC		= gcc
endif

override CPPFLAGS += -D__KERNEL__ -I../include
override ASFLAGS += $(CPPFLAGS) -D__ASSEMBLY__ -traditional

ifeq ($(TESTING),)
ifeq ($(FOREIGN),"yes")
override CFLAGS	+= -Os -Wall -fno-builtin
else
override CFLAGS	+= -Os -Wall -mno-fp-regs -fno-builtin
endif
else
override CFLAGS	+= -Os -g3 -Wall
endif

ifeq ($(TESTING),)
libaboot.a: vsprintf.o memcpy.o memset.o string.o _setjmp.o \
	_longjmp.o isolib.o __divqu.o __remqu.o __divlu.o \
	__remlu.o
	ar cru $@ $?
else
libaboot.a: isolib.o
	ar cru $@ $?
endif

clean:
	rm -f libaboot.a *.o

__divqu.o: divide.S
	$(CC) -DDIV -c -o $@ divide.S

__remqu.o: divide.S
	$(CC) -DREM -c -o $@ divide.S

__divlu.o: divide.S
	$(CC) -DDIV -DINTSIZE -c -o $@ divide.S

__remlu.o: divide.S
	$(CC) -DREM -DINTSIZE -c -o $@ divide.S