lantiq: Tune the XWAY subtarget cflags
[openwrt/staging/yousong.git] / package / mtd / src / Makefile
index b9f256ad0cc2153d52e346b9e6beee609652c1f3..4e6aee8eb5fa47d27dad28b5bfa0283719e4c9a6 100644 (file)
@@ -1,12 +1,18 @@
-# $Id$
+CC = gcc
+CFLAGS += -Wall
 
-all: mtd
+obj = mtd.o jffs2.o crc32.o
+obj.seama = seama.o md5.o
+obj.ar71xx = trx.o
+obj.brcm = trx.o
+obj.brcm47xx = $(obj.brcm)
+obj.brcm63xx = imagetag.o
+obj.ramips = $(obj.seama)
 
-%.o: %.c
-       $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $^
-
-mtd: mtd.o
-       $(CC) -o $@ $^
+ifdef FIS_SUPPORT
+  obj += fis.o
+endif
 
+mtd: $(obj) $(obj.$(TARGET))
 clean:
-       rm -f *.o mtd
+       rm -f *.o jffs2