view vidix/Makefile @ 21221:7124c26f3db3

Add generic target that allow compiling without any assembler or otherwise architecture specific code (except endiannes of course). Usage example: ./configure --target=generic-linux
author reimar
date Sat, 25 Nov 2006 17:58:33 +0000
parents 68df3b19a160
children 6460b4f44089
line wrap: on
line source

LIBNAME = libvidix.a

include ../config.mak

SRCS    = vidixlib.c
OBJS	= $(SRCS:.c=.o)

CFLAGS  = $(OPTFLAGS)

.SUFFIXES: .c .o

# .PHONY: all clean

.c.o:
	$(CC) -c $(CFLAGS) -o $@ $<

all:	$(LIBNAME) do_drivers

do_drivers:
	$(MAKE) -C drivers

$(LIBNAME):	$(OBJS)
	$(AR) r $(LIBNAME) $(OBJS)
	$(RANLIB) $(LIBNAME)

clean:
	rm -f *.o *.a *~
	$(MAKE) -C drivers clean

distclean: clean
	rm -f .depend test
	$(MAKE) -C drivers distclean

dep depend:
	$(CC) -MM $(CFLAGS) $(SRCS) 1>.depend
	$(MAKE) -C drivers depend

install:
	$(MAKE) -C drivers install

uninstall:
	$(MAKE) -C drivers uninstall

ifneq ($(wildcard .depend),)
include .depend
endif