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
|
Rev | Line | |
---|
[21430] | 1 | ifndef ODIN
|
---|
| 2 | $(error ODIN variable must be set)
|
---|
| 3 | else
|
---|
| 4 | ifeq ($(shell ls $(ODIN)/include/odin.h),)
|
---|
| 5 | $(error $(ODIN) does not contain include/odin.h)
|
---|
| 6 | endif
|
---|
| 7 | endif
|
---|
| 8 |
|
---|
| 9 | .PHONY: default
|
---|
| 10 |
|
---|
| 11 | default: all
|
---|
| 12 |
|
---|
| 13 | ODIN_DOS = $(subst /,\,$(ODIN))
|
---|
| 14 |
|
---|
| 15 | CFLAGS += -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
|
---|
| 18 | CFLAGS += -I$(ODIN)/include -I$(ODIN)/include/win
|
---|
| 19 |
|
---|
| 20 | CFLAGS += -g -DDEBUG -L$(ODIN)/lib/Debug -lkernel32.lib
|
---|
| 21 |
|
---|
| 22 | run-%: %
|
---|
| 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 |
|
---|
| 33 | CLEAN = *.exe *.map *.log
|
---|
| 34 |
|
---|
| 35 | clean::
|
---|
| 36 | -rm $(CLEAN)
|
---|
Note:
See
TracBrowser
for help on using the repository browser.