# $Id$ .PHONY: all clean OBJS = ./main.o ./httpd.o ./path.o ./wellknown.o ./util.o ./nodeinfo.o ./pgsql.o ./frontend.o ./template.o ./syslog.o ./actor.o ./key.o ./webfinger.o all: ./whiskey ./whiskey: $(OBJS) $(CC) $(LDFLAGS) -o $@ $^ $(LIBS) @echo "*** Welcome to Whiskey" ./config.h: @echo "#ifndef __WHISKEY_CONFIG_H__" > $@ @echo "#define __WHISKEY_CONFIG_H__" >> $@ @echo >> $@ @echo "#include " >> $@ @echo >> $@ @echo "/* Port where Whiskey will listen to */" >> $@ @echo "#define WHISKEY_PORT 9080" >> $@ @echo >> $@ @echo "/* Change this to change the root of your instance */" >> $@ @echo "/* DO not terminate it with slash */" >> $@ @echo "#define HOST \"whiskey.nishi.boats\"" >> $@ @echo "" >> $@ @echo "/* Define this to open the registration */" >> $@ @echo "#undef REGISTRATION" >> $@ @echo "" >> $@ @echo "/* Repository URL */" >> $@ @echo "#define REPOSITORY \"https://sw.nishi.boats/sw/~pah/whiskey\"" >> $@ @echo >> $@ @echo "/* PostgreSQL Server */" >> $@ @echo "#define SQL_SERVER \"127.0.0.1\"" >> $@ @echo >> $@ @echo "/* PostgreSQL Port */" >> $@ @echo "#define SQL_PORT NULL" >> $@ @echo >> $@ @echo "/* PostgreSQL User */" >> $@ @echo "#define SQL_USER \"whiskey\"" >> $@ @echo >> $@ @echo "/* PostgreSQL Password */" >> $@ @echo "#define SQL_PASSWORD \"whiskey\"" >> $@ @echo >> $@ @echo "/* PostgreSQL Databse name */" >> $@ @echo "#define SQL_DATABASE \"whiskey\"" >> $@ @echo >> $@ @echo "/* Prefix of the Whiskey */" >> $@ @echo "#define WHISKEY_PREFIX \"$(shell cd .. ; pwd)/Web\"" >> $@ @echo >> $@ @echo "/* Icon of the Whiskey instance */" >> $@ @echo "#define WHISKEY_ICON \"/static/icon.png\"" >> $@ @echo >> $@ @echo "/* Default wallpaper of the Whiskey instance */" >> $@ @echo "#define WHISKEY_WALLPAPER \"/static/wallpaper.jpg\"" >> $@ @echo >> $@ @echo "/* Name of the Whiskey instance */" >> $@ @echo "#define WHISKEY_NAME \"Scotch beer\"" >> $@ @echo >> $@ @echo "/* Enable syslog or not */" >> $@ @echo "#define WHISKEY_SYSLOG" >> $@ @echo >> $@ @echo "/* Whiskey PID file */" >> $@ @echo "#define WHISKEY_PIDFILE \"/var/run/whiskey.pid\"" >> $@ @echo >> $@ @echo "/* Whiskey wallpaper position */" >> $@ @echo "#define WHISKEY_WALLPAPER_POSITION \"center\"" >> $@ @echo >> $@ @echo "/* Whiskey wallpaper sizing */" >> $@ @echo "#define WHISKEY_WALLPAPER_SIZE \"cover\"" >> $@ @echo >> $@ @echo "#endif" >> $@ @echo "Generated $@" @echo "Review it and run $(MAKE) again" @exit 1 ./main.o: ./main.c ./whiskey.h ./config.h $(CC) $(CFLAGS) -c -o $@ $< ./%.o: ./%.c ./%.h ./whiskey.h ./config.h $(CC) $(CFLAGS) -c -o $@ $< clean: rm -f ./*.o ./config.h