summaryrefslogtreecommitdiff
path: root/drivers/dahdi/ap400/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/ap400/Makefile')
-rw-r--r--drivers/dahdi/ap400/Makefile29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/dahdi/ap400/Makefile b/drivers/dahdi/ap400/Makefile
new file mode 100644
index 0000000..74ff1da
--- /dev/null
+++ b/drivers/dahdi/ap400/Makefile
@@ -0,0 +1,29 @@
+ifneq ($(KBUILD_EXTMOD),)
+# We only get here on kernels 2.6.0-2.6.9 .
+# For newer kernels, Kbuild will be included directly by the kernel
+# build system.
+include $(src)/Kbuild
+
+else
+
+OCTASIC_OBJS:=$(shell ../oct612x/octasic-helper objects ../oct612x)
+OCTASIC_CFLAGS:=$(shell ../oct612x/octasic-helper cflags ../oct612x) -Wno-undef
+
+all: ap400.o
+
+%.o: %.c
+ $(CC) $(KFLAGS) $(OCTASIC_CFLAGS) -o $@ -c $<
+
+ap400_drv.o: ../zaptel.h apec.h ap400.h
+
+apec.o: apec.h ../oct612x/include/oct6100api/oct6100_api.h
+
+firmware_oct6104e-128d.o: $(src)/OCT6104E-128D.ima $(obj)/ap400_drv.o
+ @echo Making firmware object file for $(notdir $<)
+ @cd $(src) && ../build_tools/make_firmware_object $(notdir $<) $@ $(obj)/ap400_drv.o
+
+clean:
+ rm -f *.o
+ rm -f $(OCTASIC_OBJS)
+
+endif \ No newline at end of file