aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
blob: a46060517289304cc98f281962a4366ed5962cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
CXX=g++
RM=rm -fr
MKDIR=mkdir -p
PDFIUM_ROOT=/home/cms/src/pdfium/repo/pdfium
PDF_LIBS=-lpdfium -lformfiller -lfpdftext -lpdfwindow -lfxedit\
         -lfxge -ltest_support -ljavascript -lfxcrt -lfxcodec\
         -lfdrm -lfpdfapi -lfpdfdoc -lfx_lcms2 -ljpeg\
         -lfx_freetype -lfx_agg -lfx_lpng -lfx_zlib -lfx_libopenjpeg\
         -lbigint

CPPFLAGS=-Wall -g -I$(PDFIUM_ROOT)/public/
LDFLAGS= -L$(PDFIUM_ROOT)/out/obj -L$(PDFIUM_ROOT)/out/obj/third_party
LDLIBS=-lpthread -lPocoNet -lPocoFoundation -lPocoUtil -lturbojpeg

#FIXME library order is a massive PITA
LDLIBS+=$(PDF_LIBS) $(PDF_LIBS)

VPATH=src
OBJDIR=obj

SRCS=main.cpp HydraRequestHandlerFactory.cpp HydraRootHandler.cpp \
     HydraApplication.cpp HydraUnit.cpp

OBJS=$(patsubst %,$(OBJDIR)/%, $(subst .cpp,.o,$(SRCS)))
EXE=hydra

all: $(EXE)

$(OBJDIR):
	$(MKDIR) $@

$(OBJDIR)/%.o: %.cpp %.h
	$(CXX) -c $(CPPFLAGS) $< -o $@

$(EXE): $(OBJDIR) $(OBJS)
	$(CXX) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS)

clean:
	$(RM) $(OBJDIR)

dist-clean: clean
	$(RM) $(EXE)