# $Id$ BIN := ./bin OBJ := ./obj SRC := ./src INC := ./include DATE = @DATE@ PREFIX := @prefix@ CC := @CC@ CFLAGS := @CFLAGS@ LIBS := @LIBS@ START_DATE := $(shell date +"%s") OBJECTS := $(OBJ)/main.o \ $(OBJ)/tcp.o \ $(OBJ)/sdl.o \ $(OBJ)/util.o \ $(OBJ)/decompress.o .PHONY: all clean install all: $(BIN)/solbuild unifont.ttf unifont.ttf: wget http://ftp.gnu.org/gnu/unifont/unifont-15.0.06/unifont-15.0.06.ttf -O unifont.ttf $(BIN)/solbuild: $(OBJECTS) @RESOURCE@ $(TIME) $(CC) -o $@ $(OBJECTS) @RESOURCE@ $(LIBS) @echo Building took $(shell expr $(shell date +"%s") - $(START_DATE)) second\(s\). $(OBJ)/main.o: $(SRC)/main.c $(INC)/solbuild.h $(TIME) $(CC) $(CFLAGS) -c -o $@ $< $(OBJ)/%.o: $(SRC)/%.c $(INC)/solbuild/%.h $(INC)/solbuild.h $(TIME) $(CC) $(CFLAGS) -c -o $@ $< install: $(BIN)/solbuild mkdir -p $(PREFIX)/bin mkdir -p $(PREFIX)/share/solbuild cp $(BIN)/solbuild $(PREFIX)/bin/ cp unifont.ttf $(PREFIX)/share/solbuild/ clean: rm -f $(OBJ)/* rm -f $(BIN)/* rm -f solbuild.res solbuild.res: solbuild.rc @WINDOWS_TARGET@-windres $< -O coff -o $@