Skip to content

Commit

Permalink
1.1: separate code and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Nov 15, 2019
1 parent 14c3585 commit b91f0dc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# $Id$

DEBUG?=0
ifeq ($(DEBUG),1)
CFLAGS=-c -Wall -g -DJPEG2PDF_DEBUG=1
else
CFLAGS=-c -Wall -O3
endif

CC=gcc

prefix=/usr/local

all: jpeg2pdf

# build
jpeg2pdf: Jpeg2PDF.o testMain.o Jpeg2PDF.h
$(CC) Jpeg2PDF.o testMain.o -o jpeg2pdf

Jpeg2PDF.o: Jpeg2PDF.c Jpeg2PDF.h
$(CC) $(CFLAGS) Jpeg2PDF.c

testMain.o: testMain.c
$(CC) $(CFLAGS) testMain.c

# test (depends on ghostscript and poppler)
test: output.pdf
gs -q -dNODISPLAY -c quit output.pdf && pdfinfo -box -meta output.pdf

output.pdf: jpeg2pdf *.jpg
./jpeg2pdf -o output.pdf -t TitleTest -a AuthorTest *.jpg

#install
install: jpeg2pdf
install -m 0755 jpeg2pdf $(prefix)/bin

# cleanup
clean:
rm -f *.o jpeg2pdf output.pdf
# $Id$

DEBUG?=0
ifeq ($(DEBUG),1)
CFLAGS=-c -Wall -g -DJPEG2PDF_DEBUG=1
else
CFLAGS=-c -Wall -O3
endif

CC=gcc
SRCS=src
prefix=/usr/local

all: jpeg2pdf

# build
jpeg2pdf: Jpeg2PDF.o testMain.o $(SRCS)/Jpeg2PDF.h
$(CC) $^ -o $@

Jpeg2PDF.o: $(SRCS)/Jpeg2PDF.c $(SRCS)/Jpeg2PDF.h
$(CC) $(CFLAGS) $^

testMain.o: $(SRCS)/testMain.c
$(CC) $(CFLAGS) $^

# test (depends on ghostscript and poppler)
test: output.pdf
gs -q -dNODISPLAY -c quit output.pdf && pdfinfo -box -meta output.pdf

output.pdf: jpeg2pdf *.jpg
./jpeg2pdf -o output.pdf -t TitleTest -a AuthorTest *.jpg

#install
install: jpeg2pdf
install -m 0755 jpeg2pdf $(prefix)/bin

# cleanup
clean:
rm -f *.o $(SRCS)/*.gch jpeg2pdf output.pdf
File renamed without changes.
File renamed without changes.
File renamed without changes.

1 comment on commit b91f0dc

@zvezdochiot
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1.1:

  • separate code and docs

Please sign in to comment.