# Makefile zur Erstellung der Enhanced GEM-Library mit dem Lattice CC

CC = lc.ttp
AR = oml -b
RM = rm -f

# Pfad, in dem die MiNT-Header stehen, die zur Lib-Benutzung notwendig sind.
MINT_INCLUDE = d:/gcc/include

# Lattice C Compiler Optionen: K”nnen nach Bedarf eingestellt werden, wobei
# `-w' (int = short) immer eingestellt ist.
LCCOPTS = -v -j30i -j88i -b0 -bn -r6 -d0 -m0 -rs -fm -Oloop

# Name der erzeugten Library-Datei
LIB_NAME = e_gem.lib

CFLAGS = -w $(LCCOPTS) -ci -I$(MINT_INCLUDE) -D__CREATE_E_GEM_LIB__

OBJS = dial.o xacc_av.o objcedit.o objc.o popup.o graf.o tool.o image.o \
       window.o scrap.o cookie.o rc_ob_c.o alerts.o dragdrop.o filetool.o

$(LIB_NAME): $(OBJS)
	$(RM) $(LIB_NAME)
	$(AR) $(LIB_NAME) r $(OBJS)

$(OBJS): e_gem.h

.PHONY:
	clean cleanall

CLEANFILES = $(OBJS)

CLEANALLFILES = $(CLEANFILES) $(LIB_NAME)

clean:
	$(RM) $(CLEANFILES)

cleanall:
	$(RM) $(CLEANALLFILES)
