IDST_DIR ?= ../../.. OBJECTS = $(IDST_DIR)/function/objects IDC = $(IDST_DIR)/object/stage2/idc -B $(IDST_DIR)/object/stage2/ -I$(OBJECTS) OS = $(shell $(IDC) -C os) SDLINC = -J/usr/local/include -Jleastphic/sdlprims SDLLIB = -L/usr/local/lib -lSDL ifeq ($(OS),darwin) CLIBS = -lSDLmain -Wc,-framework -Wc,Cocoa else ifeq ($(OS),win32) CLIBS = -lmingw32 -lSDLmain else CLIBS = endif endif FT2INC = -J/usr/local/include/freetype2 -J/usr/include/freetype2 -Jc:/MinGW/include/freetype2 FT2LIB = -L/usr/local/lib -lfreetype IDFLAGS = -g -k -I$(OBJECTS) $(SDLINC) $(FT2INC) -Ileastphic -Jleastphic -I$(IDST_DIR)/function/jolt2/ IDLIBS = $(OBJECTS)/objects.a $(IDST_DIR)/function/jolt2/jolt.a LIBS = leastphic.a Frame.o Utility.o TestCase.o TextBuffer.o Signal.o TextController.o Range.o Shell.o Develop.o Scroll.o FONTS = verdana.ttf arial.ttf MacType.ttf profontwindows.ttf arialbd.ttf BIN = textWindow main tools layoutText unitTest circle slider turtle all : $(BIN) demo : $(LIBS) .FORCE $(MAKE) -C demo run test : unitTest ./unitTest $(FONTS) : cp leastphic/$@ . $(BIN): $(LIBS) $(FONTS) % : %.st $(IDC) $(IDFLAGS) $< $(LIBS) $(IDLIBS) -o $@ $(CLIBS) $(SDLLIB) $(FT2LIB) -execstack -s $@ %.o : %.st $(IDC) $(IDFLAGS) -c $< leastphic/%.o : leastphic/%.st $(MAKE) -C leastphic leastphic.a : leastphic/*.o ar rc $@ leastphic/*.o slider : alto.bmp alto.bmp : img/alto.jpg convert -compress None $< $@ clean : .FORCE $(MAKE) -C leastphic clean $(MAKE) -C demo clean rm -rf *~ $(BIN) *.so *.so.c *.o *.a *.o.c *.c .gdb_history $(BIN) *.exe *.ttf *.bmp *.dSYM .FORCE :