#
# Copyright (c) 2004 NVIDIA Corporation
#
# This file is released under the terms of the NVIDIA software license
# described in the LICENSE file included with this release.
#
# Makefile to create a common lib for ioctl call
#

TARGET = libcommonlib.a

CFLAGS = -g -O2 -Wall -I../.. -I../../main -I.

ifeq (x86_64,$(findstring x86_64,$(shell $(CC) -dumpmachine)))
LIBS = --start-group -L/usr/lib64 -lm --end-group
else
LIBS = --start-group -L/usr/lib -lm --end-group
endif

OBJS = \
     main.o \
     $(NULL)

all: dep $(TARGET)

-include .depend

dep:
	$(CC) $(CFLAGS) -M *.c > .depend

$(TARGET): $(OBJS)
	$(LD) -r $^ -o $@ $(LIBS)

clean:
	rm -f .depend core *~ *.o $(TARGET)

install:
	@echo Nothing to install

uninstall:
	@echo Nothing to uninstall
