2002-04-02 05:56:13 -05:00
|
|
|
CLEANFILES = test/test.o
|
|
|
|
DISTCLEANFILES = call.func callback.func cbtable.func dlconfig.rb dlconfig.h \
|
|
|
|
test/libtest.so test/*~ *~ mkmf.log
|
2002-04-03 06:59:01 -05:00
|
|
|
LDSHARED_TEST = $(LDSHARED) $(LDFLAGS) test/test.o -o test/libtest.so $(LOCAL_LIBS)
|
2002-04-02 05:56:13 -05:00
|
|
|
|
|
|
|
libtest.so: test/libtest.so
|
|
|
|
|
|
|
|
test/libtest.so: test/test.o test/libtest.def
|
|
|
|
$(RUBY) -rftools -e 'ARGV.each{|d|File.mkpath(File.dirname(d))}' $@
|
2002-04-03 06:59:01 -05:00
|
|
|
$(LDSHARED_TEST:dl.def=test/libtest.def)
|
2002-04-02 05:56:13 -05:00
|
|
|
|
2002-04-03 06:59:01 -05:00
|
|
|
test/test.o: $(srcdir)/test/test.c
|
2002-04-02 05:56:13 -05:00
|
|
|
@$(RUBY) -rftools -e 'File.mkpath(*ARGV)' test
|
2002-04-03 06:59:01 -05:00
|
|
|
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/test/test.c -o $@
|
2002-04-02 05:56:13 -05:00
|
|
|
|
|
|
|
test:: dl.so libtest.so .force
|
|
|
|
$(RUBY) -I. -I$(srcdir)/lib $(srcdir)/test/test.rb
|
|
|
|
|
|
|
|
.force:
|
|
|
|
|
|
|
|
.PHONY: .force test
|
|
|
|
|
|
|
|
allclean: distclean
|
|
|
|
@rm -f $(CLEANFILES) $(DISTCLEANFILES)
|
|
|
|
|
2002-04-03 06:59:01 -05:00
|
|
|
$(OBJS): ./dlconfig.h
|
2002-04-02 05:56:13 -05:00
|
|
|
|
|
|
|
sym.o: call.func
|
|
|
|
|
|
|
|
dl.o: callback.func cbtable.func
|
|
|
|
|
2002-04-03 06:59:01 -05:00
|
|
|
call.func: $(srcdir)/mkcall.rb ./dlconfig.rb
|
2002-04-02 05:56:13 -05:00
|
|
|
@echo "Generating call.func"
|
2002-04-03 06:59:01 -05:00
|
|
|
@$(RUBY) $(srcdir)/mkcall.rb > $@
|
2002-04-02 05:56:13 -05:00
|
|
|
|
2002-04-03 06:59:01 -05:00
|
|
|
callback.func: $(srcdir)/mkcallback.rb ./dlconfig.rb
|
2002-04-02 05:56:13 -05:00
|
|
|
@echo "Generating callback.func"
|
2002-04-03 06:59:01 -05:00
|
|
|
@$(RUBY) $(srcdir)/mkcallback.rb > $@
|
2002-04-02 05:56:13 -05:00
|
|
|
|
2002-04-03 06:59:01 -05:00
|
|
|
cbtable.func: $(srcdir)/mkcbtable.rb ./dlconfig.rb
|
2002-04-02 05:56:13 -05:00
|
|
|
@echo "Generating cbtable.func"
|
2002-04-03 06:59:01 -05:00
|
|
|
@$(RUBY) $(srcdir)/mkcbtable.rb > $@
|
2002-04-02 05:56:13 -05:00
|
|
|
|
|
|
|
debug:
|
2002-04-02 07:06:23 -05:00
|
|
|
$(MAKE) CPPFLAGS="$(CPPFLAGS) -DDEBUG"
|