2011-11-21 21:46:03 +01:00
|
|
|
# Makefile for pastebincl (command-line pastebin) by BASTIAN Théophile (aka Tobast)
|
|
|
|
|
2011-12-19 00:20:16 +01:00
|
|
|
ENC_KEY=`./genkey.py`
|
|
|
|
|
2011-11-21 21:46:03 +01:00
|
|
|
CXX=g++
|
|
|
|
CXXFLAGS=-Wall -Werror -O2
|
2011-11-28 22:09:25 +01:00
|
|
|
CXXLIBS=-lcurl
|
2011-11-21 21:46:03 +01:00
|
|
|
TARGET=pastebincl
|
2011-12-19 00:20:16 +01:00
|
|
|
OBJS=CurlPost.o func.o main.o ParameterRead.o ConfigRead.o
|
2011-11-21 21:46:03 +01:00
|
|
|
|
2011-12-25 00:48:23 +01:00
|
|
|
all: $(TARGET) makeuser
|
|
|
|
|
|
|
|
makeuser:
|
|
|
|
./pastebincl --usergen < userinput &> /dev/null
|
2011-11-21 21:46:03 +01:00
|
|
|
|
|
|
|
$(TARGET): $(OBJS)
|
|
|
|
$(CXX) $(CXXLIBS) $^ $(CXXFLAGS) -o $@
|
|
|
|
|
2011-12-19 00:20:16 +01:00
|
|
|
ConfigRead.o: ConfigRead.cpp
|
|
|
|
$(CXX) $(CXXLIBS) -c $< $(CXXFLAGS) -o $@ -DENCODING_KEY=\"${ENC_KEY}\"
|
|
|
|
|
2011-11-21 21:46:03 +01:00
|
|
|
%.o: %.cpp
|
|
|
|
$(CXX) $(CXXLIBS) -c $< $(CXXFLAGS) -o $@
|
|
|
|
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f *.o
|
|
|
|
|
|
|
|
mrproper: clean
|
|
|
|
rm -f $(TARGET)
|
|
|
|
|