Skip to content
This repository has been archived by the owner on Sep 11, 2022. It is now read-only.

Commit

Permalink
Importing Java sources, improving source code compatibility and chang…
Browse files Browse the repository at this point in the history
…ing portuguese comments to english.

git-svn-id: https://jnyikes.googlecode.com/svn/trunk@7 3dcfbc7a-9d5d-11dd-9929-29c1920dd198
  • Loading branch information
swrh committed Jul 27, 2009
1 parent bdaf5be commit 2c7e593
Show file tree
Hide file tree
Showing 17 changed files with 231 additions and 164 deletions.
38 changes: 38 additions & 0 deletions Makefile
@@ -0,0 +1,38 @@
# Makefile
#
# Copyright 2005, 2009 Fernando Silveira <fsilveira@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Fernando Silveira.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

SUBDIRS= src jsrc

ifeq ($(wildcard config.mk),)
$(error Please create a config.mk file based on config-example.mk)
endif

include config.mk
include mk/targets.mk
4 changes: 4 additions & 0 deletions config-example.mk
@@ -0,0 +1,4 @@
# config.mk

# JDK directory
JAVADIR= /usr/lib/jvm/java-6-sun
65 changes: 65 additions & 0 deletions jsrc/Makefile
@@ -0,0 +1,65 @@
# Makefile
#
# Copyright 2005, 2009 Fernando Silveira <fsilveira@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
# must display the following acknowledgement:
# This product includes software developed by Fernando Silveira.
# 4. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

include ../config.mk

SRCDIR= org/jnyikes

TMPMK= .tmp.mk

.PHONY: all clean
all clean:
@[ -f $(TMPMK) ] || $(MAKE) $(TMPMK)
@$(MAKE) -f $(TMPMK) $@

# This target will create a temporary Makefile named as $(TMPMK) which will be
# updated with all ".java" and ".class" files before each "all" and "clean"
# targets. The $(TMPMK) is used as list of files to be compiled and/or cleaned.
#
# FIXME If for any reason the file creation fails, an error will not be noticed
# by make(1) unless find(1) fails too.
.PHONY: $(TMPMK)
$(TMPMK):
@find $(SRCDIR) -name '*.java' | ( \
echo "# $@"; \
echo ".DEFAULT_GOAL=all"; \
echo "%.class: %.java"; \
echo $$'\tjavac $$<'; \
all=""; \
while read j; do \
c="$${j%.java}.class"; \
all="$${all} $${c}"; \
echo "$${c}: $${j}"; \
done; \
echo "all:$${all}"; \
echo "clean:"; \
echo $$'\t$$(RM)'"$${all}"; \
echo $$'\t$$(RM) $@'; \
) > "$@"
7 changes: 7 additions & 0 deletions jsrc/org/jnyikes/JNyIkes.java
@@ -0,0 +1,7 @@
package org.jnyikes;

class JNyIkes {
public static void main(String args[]) {
System.out.println("org.jnyikes.JNyIkes");
}
}
7 changes: 7 additions & 0 deletions jsrc/org/jnyikes/test/Main.java
@@ -0,0 +1,7 @@
package org.jnyikes.test;

class Main {
public static void main(String args[]) {
System.out.println("org.jnyikes.test.Main");
}
}
2 changes: 1 addition & 1 deletion mk/targets.mk
@@ -1,6 +1,6 @@
# targets.mk
#
# Copyright 2005, 2008 Fernando Silveira <fsilveira@gmail.com>
# Copyright 2005, 2009 Fernando Silveira <fsilveira@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
@@ -1,6 +1,6 @@
# Makefile
#
# Copyright 2005, 2008 Fernando Silveira <fsilveira@gmail.com>
# Copyright 2005, 2009 Fernando Silveira <fsilveira@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -31,7 +31,7 @@
LIB= jnyikes
SRCS= llist.c pobject.c interface.c

JAVADIR= /usr/lib/jvm/java-1.5.0-sun-1.5.0.14
include ../config.mk

INCDIRS= $(JAVADIR)/include $(JAVADIR)/include/linux
DEPLIBS= pthread
Expand Down
38 changes: 0 additions & 38 deletions src/app.h

This file was deleted.

0 comments on commit 2c7e593

Please sign in to comment.