# PROJECT_NAME         Linux driver
# MODULE               Makefile
# COMPANY              SOFTING AG Muenchen
# VERSION              5.11
# DATE                 18.03.07

# Makefile for can_test

CFLAGS=-I../../include -g -Wall -DOLD_PARAM

PRG=mk_devices

LIB=../staticLib/canlib.a

all: $(LIB) $(PRG)

SRCS=mk_devices.c devname.c

install:
	test -d /etc/softing || mkdir '/etc/softing'
	install -c mk_devices '/sbin'

mk_devices: mk_devices.o devname.o $(LIB)
	$(CC) -o $@ -lc -lpthread $^

clean:
	rm -f *.o $(PRG) *~ .depend
	$(MAKE) -C ../staticLib clean

../staticLib/canlib.a:
	$(MAKE) -C ../staticLib


.depend: $(SRCS)
	$(CC) -M $(CFLAGS) $^ >$@

# Target clean uses no dependencies
ifeq ($(MAKECMDGOALS), clean)
    NO_DEPEND = 1
endif

# Include dependencies if NO_DEPEND is not defined
ifndef NO_DEPEND
-include .depend
endif
