aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/cf/nxcompile.def
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/config/cf/nxcompile.def')
-rw-r--r--nx-X11/config/cf/nxcompile.def30
1 files changed, 30 insertions, 0 deletions
diff --git a/nx-X11/config/cf/nxcompile.def b/nx-X11/config/cf/nxcompile.def
new file mode 100644
index 000000000..ff11b5962
--- /dev/null
+++ b/nx-X11/config/cf/nxcompile.def
@@ -0,0 +1,30 @@
+/*
+ Rules to have a much cleaner compilation output
+
+ derived from Imake.rules
+*/
+
+#define RemoveFileQuiet(file) @$(RM) -f file \&>/dev/null
+
+#define RunPrintIfFailed(cmd) @cmd || { echo failed command: cmd; exit 1; }
+
+#define ObjectCompile(options) RemoveFileQuiet($@) @@\
+ ClearmakeOSName \
+ @echo \ \ CC $*.c @@\
+ RunPrintIfFailed($(CC) -c $(CFLAGS) options $*.c)
+
+#define NormalLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\
+ @echo \ \ CCLD $@ @@\
+ RemoveFileQuiet($@) @@\
+ RunPrintIfFailed(MakeLibrary($@,objlist)) @@\
+ RunPrintIfFailed(RanLibrary($@)) @@\
+ RunPrintIfFailed(_LinkBuildLibrary($@))
+
+#define DependTarget() @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ RunPrintIfFailed($(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS))