Fix 2013/hou/Makefile for a.c
I noticed a problem with my improvement to the Makefile allowing one to not use a temporary file so although the 'all' rule uses that method one can still generate a.c so one can follow the author's remarks. Links to this file were changed to code blocks, however, as the file does not always exist. make clobber will remove a and a.c.
This commit is contained in:
1 parent
cea91719e0
commit
1c471d8ecd
3 files changed
+37
-25
No files matched your search
+11
-1
@@ -114,6 +114,9 @@ OBJ= ${PROG}.o
|
||||
DATA= luna.jpg old_default.jpg otherroom.jpg otherroom.scene \
|
||||
doc/camera.png doc/cosine.png doc/draft.png doc/example.md
|
||||
TARGET= ${PROG}
|
||||
OTHER_PROG= a
|
||||
OTHER_SRC= a.c
|
||||
OTHER_OBJ= a.o
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
@@ -135,6 +138,13 @@ ${PROG}: ${PROG}.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LDFLAGS}
|
||||
./${PROG} | ${CC} ${CFLAGS} -x c - -o $@ ${LDFLAGS}
|
||||
|
||||
${OTHER_PROG}: ${PROG}.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
${OTHER_SRC}: ${OTHER_PROG}
|
||||
${RM} -f $@
|
||||
./${OTHER_PROG} > $@
|
||||
|
||||
|
||||
# alternative executable
|
||||
#
|
||||
@@ -207,7 +217,7 @@ clean:
|
||||
|
||||
clobber: clean
|
||||
${RM} -f ${TARGET} ${ALT_TARGET}
|
||||
${RM} -rf *.dSYM luna.ppm old_default.ppm otherroom.ppm
|
||||
${RM} -rf *.dSYM luna.ppm old_default.ppm otherroom.ppm a a.c
|
||||
@-if [ -e sandwich ]; then \
|
||||
${RM} -f sandwich; \
|
||||
echo 'ate sandwich'; \
|
||||
|
||||
Reference in new issue
Block a user