Browse Source

compile with resources

pull/405/head
orignal 9 years ago
parent
commit
507093dbad
  1. 8
      Makefile
  2. 3
      Makefile.mingw

8
Makefile

@ -23,6 +23,7 @@ else ifeq ($(UNAME),Linux) @@ -23,6 +23,7 @@ else ifeq ($(UNAME),Linux)
include Makefile.linux
else # win32 mingw
DAEMON_SRC += DaemonWin32.cpp Win32/Win32Service.cpp Win32/Win32App.cpp
DAEMON_RC += Win32/Resource.rc
WINDIR := True
include Makefile.mingw
endif
@ -54,10 +55,15 @@ obj/%.o : %.cpp @@ -54,10 +55,15 @@ obj/%.o : %.cpp
@mkdir -p obj
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $<
obj/%.o : %.rc
$(WINDRES) -i $< -o $@
# '-' is 'ignore if missing' on first run
-include $(DEPS)
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) $(ARLIB) $(ARLIB_CLIENT)
DAEMON_OBJS = $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC))
DAEMON_RES_OBJS = $(patsubst %.rc,obj/%.o,$(DAEMON_RC))
$(I2PD): $(DAEMON_OBJS) $(DAEMON_RES_OBJS) $(ARLIB) $(ARLIB_CLIENT)
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS)
$(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC))

3
Makefile.mingw

@ -1,9 +1,10 @@ @@ -1,9 +1,10 @@
CXX = g++
WINDRES = windres
CXXFLAGS = -O2 -D_MT -DWIN32 -D_WINDOWS -DWIN32_LEAN_AND_MEAN
NEEDED_CXXFLAGS = -std=c++11
BOOST_SUFFIX = -mt
INCFLAGS = -I/usr/include/ -I/usr/local/include/
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib -L/c/dev/openssl -L/c/dev/boost/lib
LDFLAGS = -mwindows -Wl,-rpath,/usr/local/lib -L/usr/local/lib -L/c/dev/openssl -L/c/dev/boost/lib
LDLIBS = -Wl,-Bstatic -lboost_system$(BOOST_SUFFIX) -Wl,-Bstatic -lboost_date_time$(BOOST_SUFFIX) -Wl,-Bstatic -lboost_filesystem$(BOOST_SUFFIX) -Wl,-Bstatic -lboost_regex$(BOOST_SUFFIX) -Wl,-Bstatic -lboost_program_options$(BOOST_SUFFIX) -Wl,-Bstatic -lssl -Wl,-Bstatic -lcrypto -Wl,-Bstatic -lz -Wl,-Bstatic -lwsock32 -Wl,-Bstatic -lws2_32 -Wl,-Bstatic -lgdi32 -Wl,-Bstatic -liphlpapi -static-libgcc -static-libstdc++ -Wl,-Bstatic -lstdc++ -Wl,-Bstatic -lpthread
ifeq ($(USE_AESNI),1)

Loading…
Cancel
Save