Integrate devices/Makefile
[petitboot] / Makefile
1 CC=gcc
2 TWIN_CFLAGS=$(shell pkg-config --cflags libtwin)
3 TWIN_LDFLAGS=$(shell pkg-config --libs libtwin)
4
5 LDFLAGS = 
6 CFLAGS = -O0 -ggdb -Wall
7
8 PARSERS = native
9
10 all: petitboot udev-helper
11
12 petitboot: petitboot.o devices.o
13         $(CC) $(LDFLAGS) -o $@ $^
14
15 petitboot: LDFLAGS+=$(TWIN_LDFLAGS)
16 petitboot: CFLAGS+=$(TWIN_CFLAGS)
17
18 udev-helper: devices/udev-helper.o devices/params.o \
19                 $(foreach p,$(PARSERS),devices/$(p)-parser.o)
20         $(CC) $(LDFLAGS) -o $@ $^
21
22 clean:
23         rm -f petitboot
24         rm -f udev-helper
25         rm -f *.o devices/*.o