Move usleep() version of 1995/cdua to cdua.alt.c
This is to both preserve the original code (notwithstanding the bug fixes I made) and also to allow you to compare the two versions. I now have played with even slower values and I recommended trying it to see different results in the README.md (which of course describes the alt code, how to use it and reconfigure it etc.). It's encouraged to use this version but it's also recommended to try the original version as well. Updated Makefile to do this. This reinstates the -include stdio.h -include unistd.h in CINCLUDE but the -DZ=3000 is still in the CDEFINE variable. Why? It doesn't hurt having it in the cdua.c compilation and it makes it easier to find. The cdua.alt.c still uses #include directives so that redefining CFLAGS at compilation does not cause any problems. Thank you Landon for recommending that it's moved to an alt version; I had thought of it but did not do it and this is much, much better!
This commit is contained in:
1 parent
1ab11be94c
commit
42b4d27ff2
5 files changed
+72
-16
No files matched your search
+7
-3
@@ -61,7 +61,7 @@ CDEFINE= -DZ=3000
|
||||
|
||||
# Include files that are needed to compile
|
||||
#
|
||||
CINCLUDE=
|
||||
CINCLUDE= -include stdio.h -include stdlib.h
|
||||
|
||||
# Optimization
|
||||
#
|
||||
@@ -112,8 +112,8 @@ OBJ= ${PROG}.o
|
||||
DATA=
|
||||
TARGET= ${PROG}
|
||||
#
|
||||
ALT_OBJ=
|
||||
ALT_TARGET=
|
||||
ALT_OBJ= ${PROG}.alt.o
|
||||
ALT_TARGET= ${PROG}.alt
|
||||
|
||||
|
||||
#################
|
||||
@@ -135,6 +135,10 @@ ${PROG}: ${PROG}.c
|
||||
alt: data ${ALT_TARGET}
|
||||
@${TRUE}
|
||||
|
||||
${ALT_TARGET}: ${PROG}.alt.c
|
||||
${CC} ${CFLAGS} $< -o $@ ${LIBS}
|
||||
|
||||
|
||||
# data files
|
||||
#
|
||||
data: ${DATA}
|
||||
|
||||
Reference in new issue
Block a user