diff --git a/.gitignore b/.gitignore index 18e9e73..08fd89f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ stamp-h1 .deps .libs *.la +*.a *.lo *.o src/pwntcha diff --git a/configure.ac b/configure.ac index 418aa23..852ee33 100644 --- a/configure.ac +++ b/configure.ac @@ -7,11 +7,12 @@ AM_INIT_AUTOMAKE([no-define tar-ustar]) AM_CONFIG_HEADER(config.h) AC_PREREQ(2.50) -dnlAC_CANONICAL_SYSTEM +dnl AC_CANONICAL_SYSTEM AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CXX +AC_PROG_RANLIB AC_STDC_HEADERS AC_C_CONST @@ -80,6 +81,20 @@ fi AC_OUTPUT([ Makefile src/Makefile + src/authimage/Makefile + src/clubic/Makefile + src/java/Makefile + src/linuxfr/Makefile + src/livejournal/Makefile + src/lmt/Makefile + src/paypal/Makefile + src/phpbb/Makefile + src/scode/Makefile + src/slashdot/Makefile + src/ticketmaster/Makefile + src/tickets/Makefile + src/vbulletin/Makefile + src/xanga/Makefile extras/Makefile share/Makefile ]) diff --git a/src/Makefile.am b/src/Makefile.am index 588e3e3..6d7508f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,6 @@ -NULL = + +SUBDIRS = authimage clubic java linuxfr livejournal lmt paypal phpbb scode \ + slashdot ticketmaster tickets vbulletin xanga bin_PROGRAMS = pwntcha pwntcha_SOURCES = \ @@ -7,44 +9,27 @@ pwntcha_SOURCES = \ font.c \ image.c \ common.h \ - authimage.c \ - clubic.c \ - java.c \ - linuxfr.c \ - livejournal.c \ - lmt.c \ - paypal.c \ - phpbb.c \ - scode.c \ - slashdot.c \ - tickets.c \ - ticketmaster.c \ - vbulletin.c \ - xanga.c \ easter-eggs.c \ - test.c -pwntcha_CFLAGS = $(ADDITIONAL_CFLAGS) -Wall -O6 -pwntcha_LDFLAGS = $(ADDITIONAL_LDFLAGS) -pwntcha_LDADD = $(ADDITIONAL_LDADD) + test.c \ + $(NULL) +pwntcha_CFLAGS = $(imaging_cflags) -Wall -O6 +pwntcha_LDFLAGS = $(imaging_ldflags) +pwntcha_LDADD = $(SUBDIRS:%=%/libdecoder.a) if USE_SDL -ADDITIONAL_CFLAGS = `sdl-config --cflags` -ADDITIONAL_LDFLAGS = `sdl-config --libs` -lSDL_image -ADDITIONAL_LDADD = +imaging_cflags = `sdl-config --cflags` +imaging_ldflags = `sdl-config --libs` -lSDL_image else if USE_IMLIB2 -ADDITIONAL_CFLAGS = `imlib2-config --cflags` -DX_DISPLAY_MISSING=1 -ADDITIONAL_LDFLAGS = `imlib2-config --libs` -ADDITIONAL_LDADD = +imaging_cflags = `imlib2-config --cflags` -DX_DISPLAY_MISSING=1 +imaging_ldflags = `imlib2-config --libs` else if USE_OPENCV -ADDITIONAL_CFLAGS = `opencv-config --cflags` -ADDITIONAL_LDFLAGS = `opencv-config --libs opencv highgui` -ADDITIONAL_LDADD = +imaging_cflags = `opencv-config --cflags` +imaging_ldflags = `opencv-config --libs opencv highgui` else -ADDITIONAL_CFLAGS = -ADDITIONAL_LDFLAGS = -ADDITIONAL_LDADD = +imaging_cflags = +imaging_ldflags = endif endif endif diff --git a/src/authimage/Makefile.am b/src/authimage/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/authimage/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/authimage.c b/src/authimage/decoder.c similarity index 100% rename from src/authimage.c rename to src/authimage/decoder.c diff --git a/src/clubic/Makefile.am b/src/clubic/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/clubic/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/clubic.c b/src/clubic/decoder.c similarity index 100% rename from src/clubic.c rename to src/clubic/decoder.c diff --git a/src/java/Makefile.am b/src/java/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/java/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/java.c b/src/java/decoder.c similarity index 100% rename from src/java.c rename to src/java/decoder.c diff --git a/src/linuxfr/Makefile.am b/src/linuxfr/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/linuxfr/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/linuxfr.c b/src/linuxfr/decoder.c similarity index 100% rename from src/linuxfr.c rename to src/linuxfr/decoder.c diff --git a/src/livejournal/Makefile.am b/src/livejournal/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/livejournal/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/livejournal.c b/src/livejournal/decoder.c similarity index 100% rename from src/livejournal.c rename to src/livejournal/decoder.c diff --git a/src/lmt/Makefile.am b/src/lmt/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/lmt/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/lmt.c b/src/lmt/decoder.c similarity index 100% rename from src/lmt.c rename to src/lmt/decoder.c diff --git a/src/paypal/Makefile.am b/src/paypal/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/paypal/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/paypal.c b/src/paypal/decoder.c similarity index 100% rename from src/paypal.c rename to src/paypal/decoder.c diff --git a/src/phpbb/Makefile.am b/src/phpbb/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/phpbb/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/phpbb.c b/src/phpbb/decoder.c similarity index 100% rename from src/phpbb.c rename to src/phpbb/decoder.c diff --git a/src/scode/Makefile.am b/src/scode/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/scode/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/scode.c b/src/scode/decoder.c similarity index 100% rename from src/scode.c rename to src/scode/decoder.c diff --git a/src/slashdot/Makefile.am b/src/slashdot/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/slashdot/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/slashdot.c b/src/slashdot/decoder.c similarity index 100% rename from src/slashdot.c rename to src/slashdot/decoder.c diff --git a/src/ticketmaster/Makefile.am b/src/ticketmaster/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/ticketmaster/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/ticketmaster.c b/src/ticketmaster/decoder.c similarity index 100% rename from src/ticketmaster.c rename to src/ticketmaster/decoder.c diff --git a/src/tickets/Makefile.am b/src/tickets/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/tickets/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/tickets.c b/src/tickets/decoder.c similarity index 100% rename from src/tickets.c rename to src/tickets/decoder.c diff --git a/src/vbulletin/Makefile.am b/src/vbulletin/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/vbulletin/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/vbulletin.c b/src/vbulletin/decoder.c similarity index 100% rename from src/vbulletin.c rename to src/vbulletin/decoder.c diff --git a/src/xanga/Makefile.am b/src/xanga/Makefile.am new file mode 100644 index 0000000..ddb0916 --- /dev/null +++ b/src/xanga/Makefile.am @@ -0,0 +1,6 @@ + +noinst_LIBRARIES = libdecoder.a + +libdecoder_a_SOURCES = decoder.c +libdecoder_a_CPPFLAGS = -I$(srcdir)/.. + diff --git a/src/xanga.c b/src/xanga/decoder.c similarity index 100% rename from src/xanga.c rename to src/xanga/decoder.c