File: Makefile

package info (click to toggle)
mkvmlinuz 32
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 360 kB
  • ctags: 687
  • sloc: ansic: 2,825; sh: 450; asm: 283; makefile: 68
file content (28 lines) | stat: -rw-r--r-- 926 bytes parent folder | download | duplicates (2)
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
GCC	:= gcc -m32
CFLAGS	:= -Wall -Wstrict-prototypes -O2 -g -fomit-frame-pointer -fno-builtin \
	   -nostdinc -isystem $(shell $(GCC) -print-file-name=include) -fPIC
AFLAGS	:= -D__ASSEMBLY__ $(CFLAGS) -traditional -nostdinc

src := crt0.S string.S prom.c stdio.c main.c div64.S
src += infblock.c infcodes.c inffast.c inflate.c inftrees.c infutil.c
src += mkvmlinuz-kernel-initrd.c mkvmlinuz-kernel-vmlinux.strip.c
obj := $(addsuffix .o, $(basename $(src)))
 
progs := addnote

all: $(obj) $(progs)

$(patsubst %.c,%.o, $(filter %.c, $(src))): %.o: %.c
	$(GCC) $(CFLAGS) -c -o $@ $<

$(patsubst %.S,%.o, $(filter %.S, $(src))): %.o: %.S
	$(GCC) $(AFLAGS) -c -o $@ $<

mkvmlinuz-kernel-initrd.c mkvmlinuz-kernel-vmlinux.strip.c:
	touch $@

addnote: addnote.c
	$(GCC) -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o addnote addnote.c

clean:
	rm -f $(obj) mkvmlinuz-kernel-initrd.c mkvmlinuz-kernel-vmlinux.strip.c $(progs)