Compare commits

...

2 Commits

Author SHA1 Message Date
flamingcow
1cba4ac1ae Linking order matters 2019-05-07 23:44:22 -07:00
flamingcow
9c0121b674 Rename files for consistency, switch to ld build system 2019-05-07 23:35:59 -07:00
5 changed files with 13 additions and 12 deletions

View File

@@ -2,18 +2,20 @@ FIRE_CXX ?= clang++
FIRE_CXXFLAGS ?= -O3 -std=gnu++2a -Wall -Werror FIRE_CXXFLAGS ?= -O3 -std=gnu++2a -Wall -Werror
FIRE_LDLIBS ?= -lgflags -lglog -lpthread FIRE_LDLIBS ?= -lgflags -lglog -lpthread
all: firecgi.a example_simple all: firecgi.a firecgi.o example_simple
objects = firecgi.o connection.o request.o parse.o objects = server.o connection.o request.o parse.o
_firebuf: firebuf/firebuf.o:
$(MAKE) --directory=firebuf $(MAKE) --directory=firebuf
firecgi.a: $(objects) _firebuf firecgi.a: $(objects)
ar x firebuf/firebuf.a ar rcs $@ $^
ar rcs $@ $(objects) $(shell ar t firebuf/firebuf.a)
example_simple: example_simple.o firecgi.a firecgi.o: $(objects) firebuf/firebuf.o
ld --relocatable --output=$@ $+
example_simple: example_simple.o firecgi.o
$(FIRE_CXX) $(FIRE_CXXFLAGS) -o $@ $+ $(FIRE_LDLIBS) $(FIRE_CXX) $(FIRE_CXXFLAGS) -o $@ $+ $(FIRE_LDLIBS)
%.o: %.cc *.h Makefile %.o: %.cc *.h Makefile
@@ -29,8 +31,7 @@ afl:
afl_int: connection_afl afl_int: connection_afl
connection_afl: connection_afl.o firecgi.a connection_afl: connection_afl.o firecgi.o
$(MAKE) --directory=firebuf
$(FIRE_CXX) $(FIRE_CXXFLAGS) -o $@ $+ $(FIRE_LDLIBS) $(FIRE_CXX) $(FIRE_CXXFLAGS) -o $@ $+ $(FIRE_LDLIBS)
test: test_connection test: test_connection

View File

@@ -1,7 +1,7 @@
#include <gflags/gflags.h> #include <gflags/gflags.h>
#include <glog/logging.h> #include <glog/logging.h>
#include "firecgi.h" #include "server.h"
DEFINE_int32(port, 9000, "TCP port to bind"); DEFINE_int32(port, 9000, "TCP port to bind");
DEFINE_int32(threads, 1, "Number of server threads"); DEFINE_int32(threads, 1, "Number of server threads");

Submodule firebuf updated: fa20ad9d29...49766e29f4

View File

@@ -6,7 +6,7 @@
#include <sys/socket.h> #include <sys/socket.h>
#include <thread> #include <thread>
#include "firecgi.h" #include "server.h"
#include "connection.h" #include "connection.h"
namespace firecgi { namespace firecgi {

View File