| [1251] | 1 | # $Id: helloworldc++.gmk 1798 2005-01-28 20:12:53Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | #
|
|---|
| 4 | # _System declaration and definition testcases.
|
|---|
| 5 | #
|
|---|
| 6 | # InnoTek Systemberatung GmbH confidential
|
|---|
| 7 | #
|
|---|
| 8 | # Copyright (c) 2003 InnoTek Systemberatung GmbH
|
|---|
| 9 | # Author: knut st. osmundsen <[email protected]>
|
|---|
| 10 | #
|
|---|
| 11 | # All Rights Reserved
|
|---|
| 12 | #
|
|---|
| 13 | #
|
|---|
| 14 |
|
|---|
| 15 | TESTCASE= helloworldc++
|
|---|
| 16 | ifdef GCC_OMF
|
|---|
| [1430] | 17 | CFLAGS = -Zomf -v
|
|---|
| 18 | O = .obj
|
|---|
| 19 | A = .lib
|
|---|
| 20 | CC = g++
|
|---|
| 21 | SUFF = -omf
|
|---|
| [1251] | 22 | else
|
|---|
| [1430] | 23 | CFLAGS = -Zaout -v
|
|---|
| 24 | O = .o
|
|---|
| 25 | A = .a
|
|---|
| 26 | CC = g++
|
|---|
| 27 | SUFF =
|
|---|
| [1251] | 28 | endif
|
|---|
| 29 |
|
|---|
| 30 | EXEOBJS = $(TESTCASE)$O
|
|---|
| [1430] | 31 |
|
|---|
| 32 |
|
|---|
| [1798] | 33 | all: $(TESTCASE)$(SUFF).exe #$(TESTCASE)$(SUFF)-static.exe
|
|---|
| [1251] | 34 |
|
|---|
| 35 | check: all
|
|---|
| [1431] | 36 | echo "hello world" > stdout-ok
|
|---|
| 37 | echo -n "" > stderr-ok
|
|---|
| 38 | $(TESTCASE)$(SUFF).exe > stdout 2>stderr
|
|---|
| 39 | diff stdout stdout-ok
|
|---|
| 40 | diff stderr stderr-ok
|
|---|
| [1798] | 41 | # $(TESTCASE)$(SUFF)-static.exe > stdout 2>stderr
|
|---|
| 42 | # diff stdout stdout-ok
|
|---|
| 43 | # diff stderr stderr-ok
|
|---|
| [1430] | 44 |
|
|---|
| 45 | install:
|
|---|
| 46 |
|
|---|
| [1251] | 47 | clean distclean:
|
|---|
| [1431] | 48 | rm -f *$(TESTCASE)[-.]*obj *$(TESTCASE)[-.]*o \
|
|---|
| 49 | *$(TESTCASE)[-.]*lib *$(TESTCASE)[-.]*a \
|
|---|
| 50 | *$(TESTCASE)[-.]*map $(TESTCASE)[-.]*exe \
|
|---|
| 51 | stdout-ok stdout stderr stderr-ok
|
|---|
| [1251] | 52 |
|
|---|
| 53 |
|
|---|
| 54 | .SUFFIXES:
|
|---|
| 55 | .SUFFIXES: .c .cpp .asm .s .o .obj
|
|---|
| 56 | .c$O:
|
|---|
| [1431] | 57 | $(CC) -c $(CFLAGS) -o "$(@)" "$<"
|
|---|
| [1430] | 58 |
|
|---|
| [1251] | 59 | .cpp$O:
|
|---|
| [1431] | 60 | $(CC) -c $(CFLAGS) -o "$(@)" "$<"
|
|---|
|
|---|