mirror of
https://git.wownero.com/wownero/wownero-puddle.git
synced 2024-08-15 01:03:20 +00:00
improve Makefile
This commit is contained in:
parent
3c76d658c7
commit
ab812a7076
3 changed files with 18 additions and 6 deletions
18
Makefile
18
Makefile
|
@ -2,6 +2,14 @@ TARGET = monero-pool
|
|||
|
||||
TYPE = debug
|
||||
|
||||
ifeq ($(MAKECMDGOALS),release)
|
||||
TYPE = release
|
||||
endif
|
||||
|
||||
ifeq ($(MAKECMDGOALS),profile)
|
||||
TYPE = profile
|
||||
endif
|
||||
|
||||
DIRS = src data rxi/log/src monero monero/epee/include monero/epee/src monero/common monero/crypto \
|
||||
monero/cryptonote_basic monero/cryptonote_core monero/device monero/ringdt monero/easylogging++
|
||||
|
||||
|
@ -89,13 +97,15 @@ CDFILES := $(addprefix $(STORE)/,$(CSOURCE:.c=.d))
|
|||
SDFILES := $(addprefix $(STORE)/,$(CSOURCE:.S=.d))
|
||||
|
||||
|
||||
.PHONY: clean backup dirs
|
||||
.PHONY: clean backup dirs debug release profile
|
||||
|
||||
$(TARGET): dirs $(OBJECTS) $(COBJECTS) $(SOBJECTS) $(HTMLOBJECTS)
|
||||
@echo Linking $(OBJECTS)...
|
||||
$(C++) -o $(STORE)/$(TARGET) $(OBJECTS) $(COBJECTS) $(SOBJECTS) $(HTMLOBJECTS) $(LDPARAM) $(foreach LIBRARY, $(LIBS),-l$(LIBRARY)) $(foreach LIB,$(LIBPATH),-L$(LIB)) $(PKG_LIBS) $(STATIC_LIBS)
|
||||
@cp pool.conf $(STORE)/
|
||||
|
||||
debug release profile: $(TARGET)
|
||||
|
||||
$(STORE)/%.o: %.cpp
|
||||
@echo Creating object file for $*...
|
||||
$(C++) -Wp,-MMD,$(STORE)/$*.dd $(CCPARAM) $(CXXFLAGS) $(foreach INC,$(INCPATH),-I$(INC)) $(PKG_INC)\
|
||||
|
@ -128,8 +138,9 @@ $(STORE)/%.o: %.html
|
|||
|
||||
clean:
|
||||
@echo Making clean.
|
||||
@-rm -f $(foreach DIR,$(DIRS),$(STORE)/$(DIR)/*.d $(STORE)/$(DIR)/*.o)
|
||||
@-rm -f $(TARGET)
|
||||
@find ./build -type f -name '*.o' -delete
|
||||
@find ./build -type f -name '*.d' -delete
|
||||
@find ./build -type f -name $(TARGET) -delete
|
||||
|
||||
backup:
|
||||
@-if [ ! -e build/backup ]; then mkdir -p build/backup; fi;
|
||||
|
@ -141,4 +152,5 @@ dirs:
|
|||
|
||||
-include $(DFILES)
|
||||
-include $(CDFILES)
|
||||
-include $(SDFILES)
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ First install all the dependencies.
|
|||
Then to compile the pool as a release build, run:
|
||||
|
||||
```
|
||||
make TYPE=release
|
||||
make release
|
||||
```
|
||||
|
||||
The application will be built in `build/release/`.
|
||||
|
@ -83,7 +83,7 @@ options are self explanatory.
|
|||
Ensure you have your daemon and wallet RPC up and running with the correct host
|
||||
and port settings in the pool config file.
|
||||
|
||||
Then simply `cd build/debug|release` and `./monero-pool`.
|
||||
Then simply `cd build/debug|release` and run `./monero-pool`.
|
||||
|
||||
## Supporting the project
|
||||
|
||||
|
|
|
@ -1092,7 +1092,7 @@ stratum_new_job_body(int json_id, const char *client_id, const char *job_id,
|
|||
{
|
||||
snprintf(body, CLIENT_BODY_MAX, "{\"id\":%d,\"jsonrpc\":\"2.0\",\"method\":\"job\",\"params\""
|
||||
":{\"id\":\"%.32s\",\"blob\":\"%s\",\"job_id\":\"%.32s\",\"target\":\"%.8s\","
|
||||
"\"height\":%"PRIu64"}}\n",
|
||||
"\"height\":%"PRIu64"}}\n",
|
||||
json_id, client_id, blob, job_id, target_hex, height);
|
||||
}
|
||||
return body;
|
||||
|
|
Loading…
Reference in a new issue