Integrate devices/Makefile
authorJeremy Kerr <jk@ozlabs.org>
Mon, 2 Apr 2007 00:54:51 +0000 (10:54 +1000)
committerJeremy Kerr <jk@ozlabs.org>
Mon, 2 Apr 2007 00:54:51 +0000 (10:54 +1000)
Roll the Makefile for the udev-helper into the top-level Makefile.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Makefile
devices/Makefile [deleted file]

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)
 
-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
-       rm -f *.o
+       rm -f udev-helper
+       rm -f *.o devices/*.o
diff --git a/devices/Makefile b/devices/Makefile
deleted file mode 100644 (file)
index ec9d87c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-
-CC=gcc
-CFLAGS=-Wall -g -O2
-
-parsers = native-parser.o
-
-all: udev-helper
-
-udev-helper: udev-helper.o params.o $(parsers)