makefile.linux 911 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # makefile for mngtree test-program on Linux ELF with gcc
  2. prefix=/usr/local
  3. CC=gcc
  4. INCPATH=$(prefix)/include
  5. LIBPATH=$(prefix)/lib
  6. JPEGLIB=/usr/lib
  7. ALIGN=
  8. # for i386:
  9. #ALIGN=-malign-loops=2 -malign-functions=2
  10. WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
  11. -Wmissing-declarations -Wtraditional -Wcast-align \
  12. -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
  13. # for pgcc version 2.95.1, -O3 is buggy; don't use it.
  14. CFLAGS=-I$(INCPATH) -Wall -O3 -funroll-loops -DMNG_USE_SO $(ALIGN) # $(WARNMORE) -g
  15. LDFLAGS=-L. -Wl,-rpath,. -L$(LIBPATH) -Wl,-rpath,$(LIBPATH) \
  16. -L$(JPEGLIB) -Wl,-rpath,$(JPEGLIB) -lmng -lz -ljpeg -lm
  17. OBJS = mngtree.o
  18. .SUFFIXES: .c .o
  19. .c.o:
  20. $(CC) -c $(CFLAGS) -o $@ $*.c
  21. all: mngtree
  22. mngtree: mngtree.o
  23. $(CC) -o mngtree $(CFLAGS) mngtree.o $(LDFLAGS)
  24. clean:
  25. /bin/rm -f *.o mngtree
  26. # DO NOT DELETE THIS LINE -- make depend depends on it.
  27. mngtree.o: mngtree.c