]> git.ozlabs.org Git - petitboot/blobdiff - Makefile
Integrate devices/Makefile
[petitboot] / Makefile
index b0a92ea420074af9c956585e6ebc7aadaebfe7d5..669e56a8210834994394dad86e7a41a0d318c03f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,14 +2,24 @@ CC=gcc
 TWIN_CFLAGS=$(shell pkg-config --cflags libtwin)
 TWIN_LDFLAGS=$(shell pkg-config --libs libtwin)
 
 TWIN_CFLAGS=$(shell pkg-config --cflags libtwin)
 TWIN_LDFLAGS=$(shell pkg-config --libs libtwin)
 
-LDFLAGS = $(TWIN_LDFLAGS)
-CFLAGS = -O0 -ggdb -Wall $(TWIN_CFLAGS)
+LDFLAGS = 
+CFLAGS = -O0 -ggdb -Wall
 
 
-OBJFILES = petitboot.o devices.o
+PARSERS = native
 
 
-petitboot: $(OBJFILES)
+all: petitboot udev-helper
+
+petitboot: petitboot.o devices.o
+       $(CC) $(LDFLAGS) -o $@ $^
+
+petitboot: LDFLAGS+=$(TWIN_LDFLAGS)
+petitboot: CFLAGS+=$(TWIN_CFLAGS)
+
+udev-helper: devices/udev-helper.o devices/params.o \
+               $(foreach p,$(PARSERS),devices/$(p)-parser.o)
        $(CC) $(LDFLAGS) -o $@ $^
 
 clean:
        rm -f petitboot
        $(CC) $(LDFLAGS) -o $@ $^
 
 clean:
        rm -f petitboot
-       rm -f *.o
+       rm -f udev-helper
+       rm -f *.o devices/*.o