summaryrefslogtreecommitdiff
path: root/drivers/dahdi/ap400/Makefile
blob: 74ff1dab156f6aa6af901efb7d9816846fe67937 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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