#makefile for X_WINDOWS / X320x200x256 build of JLib.
# if you think you can save some compiling time by omitting -O3 - DONT!
# the inlined string.h functions for Linux don't seem to work without it. 

AR	= ar
CC	= gcc

# Change this line to where the JLib source directory and X are on your box..
INCFLAGS = -I/home/jpg/jlib/source -I/usr/local/x11r5/include

# Change this line to wherever the jlib source directory is on your box..
# You also might need to change -lX to -lX11 (under linux I'm pretty sure)
# and add -L/path/to/xwindows/lib/dir.
LNKFLAGS = -L/home/jpg/jlib/source -lj -L/usr/local/x11r5/lib -lX

CFLAGS	= -fomit-frame-pointer -O3 -finline-functions -fstrength-reduce  \
          -fforce-mem -fforce-addr -funroll-loops -frerun-cse-after-loop \
          $(INCFLAGS)

TARGET	= target/x/palette.o target/x/misc.o target/x/blit.o 

include target/common

all:	libj.a $(DEMOS) $(UTES)

libj.a: $(TARGET) $(MODULES)
	rm -f libj.a
	$(AR) rcs libj.a $(MODULES)
	$(AR) rcs libj.a $(TARGET)

clean:
	rm $(MODULES) $(TARGET)

realclean:
	rm $(DEMOS) $(UTES)

%.exe : %.c
	$(CC) $(CFLAGS) -o $@ $< $(INCFLAGS) $(LNKFLAGS)
