#-*- Makefile -*-
include ../../gnuwin32/MkRules

MODULE=vfonts
all: makeMakedeps ../../../modules$(R_ARCH)/$(MODULE).dll

CSOURCES=g_alab_her.c g_cntrlify.c g_fontdb.c g_her_glyph.c

CPPFLAGS=-I../../include -DHAVE_CONFIG_H
CFLAGS=$(OPTFLAGS)
FFLAGS=$(OPTFLAGS)
OBJS=$(CSOURCES:.c=.o) dllversion.o

../../../modules$(R_ARCH)/$(MODULE).dll: $(OBJS)
	@$(MKDIR) -p ../../../modules$(R_ARCH)
	@$(ECHO) "EXPORTS" > vfonts.def
	@$(ECHO) " R_init_vfonts" >> vfonts.def
	$(DLL) -shared  -o $@ $^ vfonts.def -L../../../$(IMPDIR) -lR
	@$(RM) vfonts.def

clean:
	@$(RM) Makedeps *.d *.o $(MODULE).def $(MODULE).dll

# Dependencies
dllversion.o: ../../include/Rversion.h
DEPS=$(CSOURCES:.c=.d)

makeMakedeps: $(DEPS)
	@$(RM) Makedeps
	@cat $(DEPS) >> Makedeps

-include Makedeps
