# NetHalt - Source makefile # Copyright (C) 2008 Daniel Collins # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # # * Neither the name of the author nor the names of its contributors may # be used to endorse or promote products derived from this software # without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY # DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; # LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. all: nhserver.exe nhclient.exe nhtray.exe nhconfig.exe cinst.dll clean: rm -f *.o *.exe *.dll *.lib rm -f evlog.{rc,h,dll} MSG00409.bin nhserver.exe: nhserver.o lib.o globcmp.o ntservice.o g++ $(CFLAGS) -o nhserver.exe nhserver.o lib.o globcmp.o ntservice.o -lws2_32 $(LIBS) nhclient.exe: nhclient.o lib.o globcmp.o ntservice.o g++ $(CFLAGS) -Wall -o nhclient.exe nhclient.o lib.o globcmp.o ntservice.o -lws2_32 $(LIBS) nhtray.exe: nhtray.o nhtray.res.o lib.o gui.o $(CC_CMD) -mwindows -o nhtray.exe nhtray.o nhtray.res.o lib.o gui.o -lgdi32 -lws2_32 $(LIBS) nhconfig.exe: nhconfig.o nhconfig.res.o lib.o gui.o $(CC_CMD) -mwindows -o nhconfig.exe nhconfig.o nhconfig.res.o lib.o gui.o $(LIBS) nhconfig.o: nhconfig.c nhconfig.h $(CC_CMD) -c -o nhconfig.o nhconfig.c nhconfig.res.o: nhconfig.rc nhconfig.h $(WINDRES) -o nhconfig.res.o nhconfig.rc nhtray.o: nhtray.c nhtray.h $(CC_CMD) -c -o nhtray.o nhtray.c nhtray.res.o: nhtray.rc nhtray.h $(WINDRES) -o nhtray.res.o nhtray.rc nhserver.o: nhserver.cpp ntservice.o g++ $(CFLAGS) -c -o nhserver.o nhserver.cpp nhclient.o: nhclient.cpp ntservice.o g++ $(CFLAGS) -c -o nhclient.o nhclient.cpp globcmp.o: globcmp.c globcmp.h $(CC_CMD) -c -o globcmp.o globcmp.c lib.o: lib.c lib.h $(CC_CMD) -c -o lib.o lib.c gui.o: gui.c gui.h lib.h $(CC_CMD) -c -o gui.o gui.c ntservice.o: ntservice.c ntservice.h evlog.h $(CC_CMD) -c -o ntservice.o ntservice.c evlog.h: evlog.dll evlog.dll: evlog.mc $(MC) evlog.mc $(WINDRES) -o evlog.o evlog.rc $(LD) -dll -o evlog.dll evlog.o nsplugin.o: nsplugin.c nsplugin.h $(CC_CMD) -c -o nsplugin.o nsplugin.c cinst.dll: cinst.c nsplugin.o $(CC_CMD) -c -o cinst.o cinst.c $(CC_CMD) -shared -o cinst.dll cinst.o nsplugin.o -lnetapi32