source: trunk/testapp/common.mak@ 21430

Last change on this file since 21430 was 21430, checked in by dmik, 15 years ago

testapp: Put common defs in a single makefile.

File size: 806 bytes
Line 
1ifndef ODIN
2$(error ODIN variable must be set)
3else
4ifeq ($(shell ls $(ODIN)/include/odin.h),)
5$(error $(ODIN) does not contain include/odin.h)
6endif
7endif
8
9.PHONY: default
10
11default: all
12
13ODIN_DOS = $(subst /,\,$(ODIN))
14
15CFLAGS += -D__WIN32OS2__ -D__i386__ -DSTRICT -D_POSIX_SOURCE \
16 -D_POSIX_C_SOURCE=200112 -D_EMX_SOURCE -D_XOPEN_SOURCE=600 \
17 -D_SVID_SOURCE
18CFLAGS += -I$(ODIN)/include -I$(ODIN)/include/win
19
20CFLAGS += -g -DDEBUG -L$(ODIN)/lib/Debug -lkernel32.lib
21
22run-%: %
23 @echo [Running $<]
24 @echo.
25 @cmd /c "set BEGINLIBPATH=$(ODIN_DOS)/bin/Debug;$(ODIN_DOS)/bin;%BEGINLIBPATH% && $<"
26
27%.exe: %.c
28 gcc $< -Zomf -Zmap -Zlinker /PM:VIO -o $@ $(CFLAGS)
29
30%.s: %.c
31 gcc $< -S -Zomf -o $@ $(CFLAGS)
32
33CLEAN = *.exe *.map *.log
34
35clean::
36 -rm $(CLEAN)
Note: See TracBrowser for help on using the repository browser.