History

Makefile: build --config-cross libtcc1.a directly to win32/lib

Henry Kroll III committed 15 years ago

Commit 7b18df11 parent 48a2a8d1 file · +8 −7Browse files

Unified · Split

Makefile+8−7
@@ -5,6 +5,7 @@ · 4 unmodified lines
5TOP ?= .5TOP ?= .
6include $(TOP)/config.mak6include $(TOP)/config.mak
7TCC=./tcc7TCC=./tcc
8LIBTCC1_DIR= $(TOP)
8CFLAGS+=-g -Wall9CFLAGS+=-g -Wall
9CFLAGS_P=$(CFLAGS) -pg -static -DCONFIG_TCC_STATIC10CFLAGS_P=$(CFLAGS) -pg -static -DCONFIG_TCC_STATIC
10LIBS_P=11LIBS_P=
@@ -185,12 +186,6 @@ libtcc.so.1.0: $(LIBTCC_OBJ) · 174 unmodified lines
185libtcc_test$(EXESUF): tests/libtcc_test.c $(LIBTCCB)186libtcc_test$(EXESUF): tests/libtcc_test.c $(LIBTCCB)
186 $(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS) $(LIBTCCL)187 $(CC) -o $@ $^ -I. $(CFLAGS) $(LIBS) $(LIBTCCL)
187 188
188# use i386-win32-tcc instead of tcc.exe to build libtcc1.a on Linux
189# ar t libtcc1.a will list the ELF objects
190LinuxWIN32libtcc1: $(WIN32_CROSS)
191 $(MAKE) ARCH=i386 CONFIG_WIN32=1 TCC=./i386-win32-tcc libtcc1.a
192 @-mv libtcc1.a win32/lib
193
194libtest: libtcc_test$(EXESUF) $(LIBTCC1)189libtest: libtcc_test$(EXESUF) $(LIBTCC1)
195 ./libtcc_test$(EXESUF) lib_path=.190 ./libtcc_test$(EXESUF) lib_path=.
196 191
@@ -209,6 +204,12 @@ LIBTCC1_OBJS=libtcc1.o $(ALLOCA_O) · 12 unmodified lines
209LIBTCC1_CC=$(CC)204LIBTCC1_CC=$(CC)
210VPATH+=lib205VPATH+=lib
211 206
207# use i386-win32-tcc (WIN32_CROSS) to build libtcc1.a on Linux
208# ar t libtcc1.a will list the ELF objects
209LinuxWIN32libtcc1: $(WIN32_CROSS)
210 $(MAKE) TCC=./i386-win32-tcc LIBTCC1_DIR=win32/lib ARCH=i386 \
211 CONFIG_WIN32=1 CFLAGS+="-Bwin32 -Iinclude" ./win32/lib/libtcc1.a
212
212ifdef CONFIG_WIN32213ifdef CONFIG_WIN32
213# for windows, we must use TCC because we generate ELF objects214# for windows, we must use TCC because we generate ELF objects
214LIBTCC1_OBJS+=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o bcheck.o215LIBTCC1_OBJS+=crt1.o wincrt1.o dllcrt1.o dllmain.o chkstk.o bcheck.o
@@ -221,7 +222,7 @@ endif · 6 unmodified lines
221%.o: %.S222%.o: %.S
222 $(LIBTCC1_CC) -o $@ -c $<223 $(LIBTCC1_CC) -o $@ -c $<
223 224
224libtcc1.a: $(LIBTCC1_OBJS)225$(LIBTCC1_DIR)/libtcc1.a: $(LIBTCC1_OBJS)
225 $(AR) rcs $@ $^226 $(AR) rcs $@ $^
226 227
227# install228# install

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t