aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config/cf/nxcompile.def
blob: 82192b60b5535f197f8b440b2af1366fcda71ccc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/*
  our own 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 \ \ Creating lib: $@					@@\
	RemoveFileQuiet($@)						@@\
	RunPrintIfFailed(MakeLibrary($@,objlist))			@@\
	RunPrintIfFailed(RanLibrary($@))				@@\
	RunPrintIfFailed(_LinkBuildLibrary($@))

#define	DependTarget()						@@\
DependDependency()							@@\
									@@\
depend::								@@\
	RunPrintIfFailed($(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS))