IDST_DIR ?= ../.. FUNCPATH = $(IDST_DIR)/function IDCPATH = $(IDST_DIR)/object/stage2 OBJPATH = $(FUNCPATH)/objects IDC = $(IDCPATH)/idc ifeq ($(shell uname | grep NT > /dev/null ; echo $$?), 0) DLL = *.dll else ifeq ($(shell uname),Darwin) DLL = -L/opt/local/lib -lcairo -lSDL -lSDLmain -Wc,-framework -Wc,Cocoa else DLL = -lSDL -lcairo endif endif IDCLDFLAG = -g -B $(IDCPATH)/ -I$(OBJPATH) $(OBJPATH)/objects.a -JSDL $(DLL) # IDCFLAG = -Wc,-p -k -g -B $(IDCPATH)/ -I$(OBJPATH) -I$(FUNCPATH)/jolt2 -JSDL -Jcairo IDCFLAG = -g -B $(IDCPATH)/ -I$(OBJPATH) -I$(FUNCPATH)/jolt2 -JSDL -Jcairo OBJS = sdl.o _cairo.o \ Colour.o Geometry.o MiniCairo.o Event.o Editor.o Shell.o \ HostWindow.o SDLWindow.o \ Recovery.o TestCase.o TextBuffer.o Utility.o \ Shape.o Transform.o EventHandler.o \ Views-events.o Views-scrolling.o Views-layout.o Views-world.o \ Views-drawing.o Views-properties.o Views.o Signal.o \ $(FUNCPATH)/jolt2/jolt.a _vtable.o BIN = bottle unitTest all: $(BIN) test : unitTest # prove -v ./unitTest.sh ./unitTest bottle : $(OBJS) unitTest : $(OBJS) shellMain : $(OBJS) % : %.st $(IDC) $< $(OBJS) $(IDCFLAG) $(IDCLDFLAG) -execstack -s $@ %.o : %.st $(IDC) -c $< $(IDCFLAG) clean: rm -rf *.exe $(BIN) *.o *.o.c *.dSYM Recovery.o : Recovery.st $(IDC) -B $(IDCPATH)/ -I$(OBJPATH) -I$(FUNCPATH)/jolt-burg -c $< archive: bottle zip bottle.zip welcome.txt bottle.exe *.dll lib/*.k idc: idc.in cat $< | \ sed 's|@IDCPATH@|$(IDCPATH)|g' | \ sed 's|@OBJPATH@|$(OBJPATH)|g' | \ sed 's|@FUNCPATH@|$(FUNCPATH)|g' > idc chmod 755 idc