J
juergen
Hi,
I was using C/C++ and make files for many years (2 decades). It was
possible to compile large project with many source-files very quickly,
because only the updated file needed to be compiled and the rest only
linked.
$(BINARY):$(OBJFILES)
$(CC) $(OBJFILES) $(LIBS) -o $(BINARY)
midev.o : $(CODIRmm)/midev.c
$(CC) $(CFLAGS) -c $< -o $@
....
In Java it is also possible to use make. First compile the class-files,
then generate the *.jar.
I tried to write a makefile that compiles every *.java file
individually, but that wouldn't work.
It seems that javac only compiles when all source-files are given like
this:
notdis.jar: $(SRC) $(TSRC)
javac -g -d build $(SRC) $(TSRC)
jar cfm $@ manifest.mf -C build .
How do you handle big projects with many source-files?
Useful ideas are very welcome!
Juergen
I was using C/C++ and make files for many years (2 decades). It was
possible to compile large project with many source-files very quickly,
because only the updated file needed to be compiled and the rest only
linked.
$(BINARY):$(OBJFILES)
$(CC) $(OBJFILES) $(LIBS) -o $(BINARY)
midev.o : $(CODIRmm)/midev.c
$(CC) $(CFLAGS) -c $< -o $@
....
In Java it is also possible to use make. First compile the class-files,
then generate the *.jar.
I tried to write a makefile that compiles every *.java file
individually, but that wouldn't work.
It seems that javac only compiles when all source-files are given like
this:
notdis.jar: $(SRC) $(TSRC)
javac -g -d build $(SRC) $(TSRC)
jar cfm $@ manifest.mf -C build .
How do you handle big projects with many source-files?
Useful ideas are very welcome!
Juergen