libuevent now compiles

This commit is contained in:
madsenco committed 2012-03-08 12:33:28 +01:00
1 parent 70dced803c
commit 3dd80622f4
4 files changed
+691

No files matched your search

+42
View File
@@ -0,0 +1,42 @@
##
# @file Makefile
# Make the micro eventlib, lua bindings and tests
#
# $Id$
#
# (C) Copyright 2012 flemming.madsen at madsensoft.dk. See libuevent.h
##
CROSS_COMPILE=
#CROSS_COMPILE=arm-linux-uclibc-
CC=$(CROSS_COMPILE)gcc
AR=$(CROSS_COMPILE)ar
LDFLAGS=-s
CFLAGS=-fPIC -g -Os
MAJOR = 1
all: libuevent.a libuevent.so.$(MAJOR)
lua: luauevent.so
libuevent.a: libuevent.o
$(AR) r $@ $^
libuevent.so.$(MAJOR): libuevent.o
$(CC) $(LDFLAGS) -shared -o $@ $^ -Wl,-soname=libuevent
luauevent.so: luauevent.o all
$(CC) $(LDFLAGS) -shared -o $@ $^ -L . -l uevent -Wl,-soname=uevent
test: all
$(CC) -o test test.c && test
luatest: lua
lua test.lua
clean:
rm -f libuevent.o luauevent.o libuevent.so.$(MAJOR) luauevent.so test
.PHONY: all test clean luatest lua