2008-02-05 23:32:49 +00:00
|
|
|
ifeq (Windows_NT,$(OS))
|
|
|
|
WIN=1
|
|
|
|
WINCMD=1
|
2008-04-03 23:16:07 +00:00
|
|
|
ifeq ($(findstring msys,$(shell sh --version 2>nul)),msys)
|
|
|
|
WINCMD=0
|
|
|
|
endif
|
2008-02-05 23:32:49 +00:00
|
|
|
endif
|
2006-08-11 03:07:32 +00:00
|
|
|
|
2006-06-20 20:30:39 +00:00
|
|
|
CC = gcc
|
|
|
|
CFLAGS = -Os -Wall -fomit-frame-pointer
|
|
|
|
LDFLAGS = -s
|
|
|
|
|
2008-02-05 23:32:49 +00:00
|
|
|
OBJS = updaterevision.o
|
|
|
|
|
2006-08-11 03:07:32 +00:00
|
|
|
ifeq (1,$(WIN))
|
2006-06-20 20:30:39 +00:00
|
|
|
EXE = updaterevision.exe
|
2008-02-05 23:32:49 +00:00
|
|
|
OBJS += trustinfo.o
|
2006-06-20 20:30:39 +00:00
|
|
|
else
|
|
|
|
EXE = updaterevision
|
|
|
|
endif
|
|
|
|
|
2006-08-11 03:07:32 +00:00
|
|
|
CCDV = @../../ccdv
|
|
|
|
|
2006-06-20 20:30:39 +00:00
|
|
|
all: $(EXE)
|
|
|
|
|
|
|
|
$(EXE): $(OBJS)
|
|
|
|
$(CCDV) $(CC) -o $(EXE) $(OBJS) $(CFLAGS) $(LDFLAGS)
|
|
|
|
|
2008-02-10 01:21:45 +00:00
|
|
|
%.o : %.rc
|
|
|
|
$(CCDV) windres -o $@ -i $<
|
2008-02-05 23:32:49 +00:00
|
|
|
|
2006-06-20 20:30:39 +00:00
|
|
|
.PHONY: clean
|
|
|
|
|
|
|
|
clean:
|
2006-08-11 03:07:32 +00:00
|
|
|
ifeq (1,$(WINCMD))
|
2006-06-20 20:30:39 +00:00
|
|
|
-del /q /f $(EXE) 2>nul
|
|
|
|
-del /q /f *.o 2>nul
|
|
|
|
else
|
|
|
|
-rm -f $(EXE)
|
|
|
|
-rm -f *.o
|
|
|
|
endif
|