########################################################### # Common variables and targets for Xang # # See Makefile for important environment notes # ########################################################### ########################################################### # Project-specific variables and rules # # You should not need to edit these ########################################################### JAVAX = .java CLASSX = .class JARX = .jar OBJS = $(SRCS:%.java=%.class) # A simple marker file created to show last compile time # Note subdirectories may reset the name! SINCE_FILE = since.last # Relative directory (usually from ./src/.) where class files are to go CLASS_DIR = classes CURRENT_DIR = . JARNAME = xang$(JARX) ########################################################### # Environment-specific tools and flags definitions # # You may need to edit these if you're not using # a standard JDK or the tools aren't on the path. ########################################################### JAVA = java JAVAC = javac JAVACFLAGS = -g -d $(CLASS_DIR) # JAVACFLAGS = -g:none -O -d $(CLASS_DIR) JAR = jar JARFLAGS = cf0 JAVADOC = javadoc # Note that the xdocs subdir requires the use of at least JDK 1.2, # even though the src code will compile with JDK 1.1.8 (or equivalent) JAVA12 = java JAVAC12 = javac JAVADOC12 = javadoc RM = rm -f CP = cp -f UPDIR := .. # Decide if we're on unix or DOS ifeq (,$(findstring usr,$(PATH))) # DOS PATHSEP := \\ CLPATHSEP := ; else # UNIX PATHSEP := / CLPATHSEP := : endif ########################################################### # Main targets definitions ########################################################### .PHONY: makeall makeall: all .PHONY: clean clean:: $(RM) *.class $(JARNAME) *~ *.bak *.o *.obj *.dll $(SINCE_FILE) .PHONY: makesubdirs makesubdirs: @for i in $(SUBDIRS) ; \ do \ (cd $$i; echo Making Xang engine in "$(CURRENT_DIR)/$$i"; \ $(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile JAVACFLAGS="$(JAVACFLAGS)" all); \ done .PHONY: makedocs makedocs: @for i in xdocs ; \ do \ (cd $$i; echo making x-docs in "$(CURRENT_DIR)/$$i..."; \ $(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile all); \ done .PHONY: makesamples makesamples: @for i in samples ; \ do \ (cd $$i; echo making samples in "$(CURRENT_DIR)/$$i..."; \ $(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile all); \ done .PHONY: cleansubdirs cleansubdirs: -@for i in $(SUBDIRS) ; \ do \ (cd $$i; echo cleaning in "$(CURRENT_DIR)/$$i..."; \ $(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i -f make_xang $(MFLAGS) clean); \ done .PHONY: cleandocs cleandocs: @for i in docs ; \ do \ (cd $$i; echo cleaning up docs "$(CURRENT_DIR)/$$i..."; \ $(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile clean); \ done .PHONY: cleansamples cleansamples: @for i in samples ; \ do \ (cd $$i; echo cleaning up samples "$(CURRENT_DIR)/$$i..."; \ $(MAKE) CURRENT_DIR=$(CURRENT_DIR)/$$i $(MFLAGS) -f Makefile clean); \ done # End of file